Thread: [ADMIN] pg_dump: [archiver (db)] query failed: ERROR: could not access file"$libdir/postgis-2.1": No such file or directory
[ADMIN] pg_dump: [archiver (db)] query failed: ERROR: could not access file"$libdir/postgis-2.1": No such file or directory
From
John Kelly
Date:
I am having a problem with a solaris 10 postgresql 9.3 postgis 2.1.3 system. The origin system crashed and all SW was lost. They moved the database files residing on a san to another solaris system 10 that had postgresql installed but no postgis. I don’t have permissions to install postgis nor do they have all the utilities necessary to build it.
I tried to do a pg_dump so that I can create the database on a intel platform where I have permissions. When I do pg_dump it terminates with
pg_dump: [archiver (db)] query failed: ERROR: could not access file "$libdir/postgis-2.1": No such file or directory
pg_dump: [archiver (db)] query was: SELECT a.attnum, a.attname, a.atttypmod, a.attstattarget, a.attstorage, t.typstorage, a.attnotnull, a.atthasdef, a.attisdropped, a.attlen, a.attalign, a.attislocal, pg_catalog.format_type(t.oid, a.atttypmod) AS atttypname, array_to_string(a.attoptions, ', ') AS attoptions, CASE WHEN a.attcollation <> t.typcollation THEN a.attcollation ELSE 0 END AS attcollation, pg_catalog.array_to_string( ARRAY(SELECT pg_catalog.quote_ident(option_ name) || ' ' || pg_catalog.quote_literal( option_value) FROM pg_catalog.pg_options_to_ table(attfdwoptions) ORDER BY option_name), E',
') AS attfdwoptions FROM pg_catalog.pg_attribute a LEFT JOIN pg_catalog.pg_type t ON a.atttypid = t.oid WHERE a.attrelid = '6129600'::pg_catalog.oid AND a.attnum > 0::pg_catalog.int2 ORDER BY a.attrelid, a.attnum
all the object for postgis are in public but postgres doesn’t show the extension being installed. How can I get around this problem so I dump this database?
Thanks
Re: [ADMIN] pg_dump: [archiver (db)] query failed: ERROR: could notaccess file "$libdir/postgis-2.1": No such file or directory
From
Lucas Possamai
Date:
2017-02-16 15:45 GMT+13:00 John Kelly <jtkells@gmail.com>:
I am having a problem with a solaris 10 postgresql 9.3 postgis 2.1.3 system. The origin system crashed and all SW was lost. They moved the database files residing on a san to another solaris system 10 that had postgresql installed but no postgis. I don’t have permissions to install postgis nor do they have all the utilities necessary to build it.I tried to do a pg_dump so that I can create the database on a intel platform where I have permissions. When I do pg_dump it terminates withpg_dump: [archiver (db)] query failed: ERROR: could not access file "$libdir/postgis-2.1": No such file or directorypg_dump: [archiver (db)] query was: SELECT a.attnum, a.attname, a.atttypmod, a.attstattarget, a.attstorage, t.typstorage, a.attnotnull, a.atthasdef, a.attisdropped, a.attlen, a.attalign, a.attislocal, pg_catalog.format_type(t.oid,a.atttypmod) AS atttypname, array_to_string(a.attoptions, ', ') AS attoptions, CASE WHEN a.attcollation <> t.typcollation THEN a.attcollation ELSE 0 END AS attcollation, pg_catalog.array_to_string(ARR AY(SELECT pg_catalog.quote_ident(option_ name) || ' ' || pg_catalog.quote_literal(optio n_value) FROM pg_catalog.pg_options_to_table (attfdwoptions) ORDER BY option_name), E', ') AS attfdwoptions FROM pg_catalog.pg_attribute a LEFT JOIN pg_catalog.pg_type t ON a.atttypid = t.oid WHERE a.attrelid = '6129600'::pg_catalog.oid AND a.attnum > 0::pg_catalog.int2 ORDER BY a.attrelid, a.attnumall the object for postgis are in public but postgres doesn’t show the extension being installed. How can I get around this problem so I dump this database?Thanks
Make sure to have that package installed on your OS.
In my case, using Ubuntu-server and PostgreSQL 9.2:
apt-get install -y postgresql-9.2-postgis-2.3
Then, you need to check if the DB has the same version of Postgis[1]:
name | default_version | installed_versionpostgis | 2.3.0 | 2.2.0
If not (in my case it didn't have same version), you need to update the DB:
ALTER EXTENSION postgis UPDATE TO "2.3.0"