postgres upgrade from 10.9 to 11.4 on aws rds failure with below reason
Database instance is in a state that cannot be upgraded: PreUpgrade
checks failed: The instance could not be upgraded because there are
one or more databases with an older version of PostGIS installed.
Please upgrade all installations of PostGIS and try again.
i have postgis 2.4.4 installed and command
ALTER EXTENSION postgis UPDATE;
fails with message
NOTICE: version "2.4.4" of extension "postgis" is already installed
and command
ALTER EXTENSION postgis UPDATE TO "2.5.1"
fails with this message
extension "postgis" has no update path from version "2.4.4" to version
"2.5.1"
In order to upgrade to version 2.5.* you need to run the following command
ALTER EXTENSION postgis UPDATE TO "2.5.2";
It gives you that error because there is no upgrade from 2.4.4 to 2.5.1. You can only move to 2.5.2 as next step.
Refer to this page under section "PostgreSQL version 10.x extensions supported on Amazon RDS".
And similarly if you wanted to go to 3.1.4 from 2.4.4, you must first go to 2.5.2 and then to 3.1.4.
Related
Am trying to link postgresql database to strapi V4 and my postgresql database has postgis extensions installed. When I run my application I get the following error . Is there a way to fix this ?
Any suggestion or resolution would be of great help
error: drop table if exists “public”.“us_gaz” - cannot drop table us_gaz because extension address_standardizer_data_us requires it
This is the system information
Strapi Version: Strapi V4
Operating System: windows 10
Database: posgresql 14
Node Version: v14.17.5
NPM Version: 6.14.14
Yarn Version: 1.22.11
Thanks
I use Centos 7 and Postgresql 12. I installed already PostGIS and created successfully its extension. I'm now tring to install semver extension with create extension semver and get following error:
ERROR: incompatible library »/usr/pgsql-12/lib/semver.so«: version
does not match
According to developer this version should work with my Postgresql 12. Why am i getting this error?
Thanks!
An extension's .so binaries are specific to a major release of Postgres.
If you're installing the extension through yum, there would typically be a different package for each Postgres version. For example, if you installed Postgres 12 using the postgresql12-server package, then you would install PostGIS 3.0 using the postgis30_12 package.
If the package name is just pg-semver, without a Postgres version number, then it's probably intended for your distribution's default postgresql-server package. In CentOS 7, this appears to be Postgres 9.2, so these files won't work on a Postgres 12 server.
If you can't find a PG12-specific package, you'll need to build it yourself, using the instructions here.
I'm using postgres in pycharm and it can't find the postGIS extensions. It is looking for them in: /Library/PostgreSQL/9.6/share/postgresql/extension/
however, when I install PostGIS, it tells me that: PostGIS extension modules are installed in: /usr/local/share/postgresql/extension
Another issue (don't know if it is related to the first) is : could not access file "$libdir/postgis-2.3": No such file or directory
I noticed this issue after having upgraded from PostGIS 2.3.0 to 2.4.0. My databases were still looking for 2.3.0 libraries when the 2.4.0 were installed.
The solution was to individually update the databases to look for the 2.4.0 versions:
ALTER EXTENSION postgis UPDATE;
SELECT PostGIS_full_version();
See Upgrading PostGIS section for further details
I installed using Homebrew and ran into this same issue. Seems to be resolved after following instructions from https://www.linuxquestions.org/questions/fedora-35/problems-to-start-postgresql-with-postgis-after-upgrade-to-fedora-28-a-4175629479/#post5853352:
Find where postgis-2.4.so is (e.g.
/database/postgresql/pgsql-10.0/lib/postgis-2.4.so) then create a
symbolic link to older name so for my example I'd do:
ln -s /database/postgresql/pgsql-10.0/lib/postgis-2.4.so /database/postgresql/pgsql-10.0/lib/postgis-2.3.so
For me, the fix was this exact command:
ln -s /usr/local/lib/postgresql/postgis-2.5.so /usr/local/lib/postgresql/postgis-2.3.so
I have upgraded from OS X 10.9 to 10.10 Yosemite. I was running postgresql 9.3.3 with postgis 2.1. I did not do a pgdump before upgrading to OS X 10.10 (I know, I know, kill me...) but I have the original data directory. I did a brew install postgresql and got 9.4.4. So I installed Postgresql 9.3.9 (the only 9.3 version I could find) with Homebrew. Also brew install postgis. I then got a version 2.1 Postgis for Postgresql 9.4.4. I tried to install postgis20 but that does not work with my database.
When I start Postgresql 9.3.3 I can see all my databases but when I browse I get the error:
ERROR: could not access file "$libdir/postgis-2.1": No such file or directory
I tried to link to posts-2.1 in the $libdir directory but then I get this message:
ERROR: incompatible library "/usr/local/Cellar/postgresql93/9.3.9/lib/postgis-2.1.so": version mismatch
DETAIL: Server is version 9.3, library is version 9.4.
So obviously I need a postgis-2.1 for Postgresql 9.3 but I don't know how to fix that.
If I try to run a pg_dumpall I get this error (obvious I guess):
➜ ./pg_dumpall >> old_backup.sql
pg_dump: Dumping the contents of table "darwin_test" failed: PQgetResult() failed.
pg_dump: Error message from server: ERROR: could not load library "/usr/local/Cellar/postgresql/9.3.3/lib/postgis-2.1.so": dlopen(/usr/local/Cellar/postgresql/9.3.3/lib/postgis-2.1.so, 10): Symbol not found: _json_tokener_errors
Referenced from: /usr/local/Cellar/postgresql/9.3.3/lib/postgis-2.1.so
Expected in: /usr/local/lib/libjson-c.2.dylib
in /usr/local/Cellar/postgresql/9.3.3/lib/postgis-2.1.so
So how do I get postgis-2.1 to work again with postgresql 9.3.3?
In homebrew I only find a postgis-2.1 for postgresql94.
Use brew edit postgis to change the postgresql references to postgresql93 in the install script and then run brew install postgis. You might also have to link/unlink postgresql using brew link postgresql93 or brew unlink postgresql.
Since we upgrade our postgresql 8.3 to postgresql 9, \d command doesnt works anymore with psql-client 8.3 :
ERROR: column "reltriggers" does not exist
LINE 1: SELECT relhasindex, relkind, relchecks, reltriggers, relhasr"
In postgres trees psql-client must download as one package with postgresql9. Where i can download only psql-client binary package a.k.a psql for Postgresql 9.0 ?
Update:
This case occur when older psql-client trying to access a newer version of postgres (psql-client: 8.3 trying to access postgres-server: 9.0).
It appears that Ubuntu does not ship PostgreSQL 9.0 yet. So this could be a bit tricky. Either you build PostgreSQL 9.0 from source and only install the client parts that you want, or you download the Debian source package for postgresql-9.0 and build that on Ubuntu and then only install the postgresql-client-9.0 package.
Or you install the postgresql-client-8.4 package. This isn't quite the solution, but it's closer to it, and I verified that it will get you past the error you showed.