Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SQL Import #970

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open

Fix SQL Import #970

wants to merge 1 commit into from

Conversation

davidvasandani
Copy link
Contributor

@pgiraud thanks for your help. The current error;

could not access file "$libdir/postgis-1.5": No such file or directory

Postgis 1.5 isn't available in apt and when building from source there is an incompatibility with Postgres 9.

  • Is our database dependent on Postgis 1.5?
  • Is there an upgrade path to move to Postgis 2.3?

@pgiraud
Copy link
Collaborator

pgiraud commented Feb 3, 2017

No it's not dependent on Postgis 1.5. I have a version running 2.3 on my computer right now.
When do you get this error?

@bgirardot
Copy link
Contributor

I think they are output from pg_restore trying to restore to a new installation of tm2 so we can migrate to new dedicated hardware

@davidvasandani
Copy link
Contributor Author

@pgiraud, @bgirardot is correct. This is the error during a pg_restore. The full output is here.

@pgiraud
Copy link
Collaborator

pgiraud commented Feb 7, 2017

Hi. I can confirm that the problem we have here is that we are trying to restore a dump created with a 1.5 version of PostGIS into a 2.x.
The pg_restore command is not able to handle this.

However, there's a postgis_restore.pl perl script which can help.

The following command will restore the database after migrating it from 1.5 to 2.1. It leads to almost no error provided you create the database with taskmanv2 as owner. I don't think it's possible to change the owner or roles using this command unfortunately. Anyway, it's not a bad to use a username other than "www-data".

perl /usr/share/postgresql/9.3/contrib/postgis-2.1/postgis_restore.pl osmtm2_038.dmp | sudo -u postgres psql -d osmtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants