Postgis syntax PARALLEL error - postgresql

I can't create extension in my db. throws a error that says
CREATE EXTENSION postgis;
ERROR: syntax error at or near "PARALLEL"
Position: 2445
Is there any solution for this issue ?
PostgreSQL version 9.6.
PostGis version 2.3.
Thanks !

No one could possibly debug this without knowing a lot more information, but it's either
a (syntax) error in the extension itself
you're not running PostgreSQL 9.6 (maybe you have some earlier version installed alongside it)
Connect to the database that you ran CREATE EXTENSION on, and run this
SELECT version();
My assumption is that you're not on a 9.6 server, and that you're connecting to some earlier version of PostgreSQL. PARALLEL was new with 9.6.

Related

Not able to upgrade PostGIS - 'permission denied to set parameter "cloudsql.extension_maintenance"'

I am trying to upgrade a Google Cloud SQL Postgres server from 9.6 to 14.
This upgrade fails with the following error
pre-upgrade check failed: errors:{type:INVALID_EXTENSION_VERSION detail:"extension
"postgis" needs to be upgraded to "3.1.4" before major version upgrade for database
"optoscale""}
To upgrade the server I run
postgres=> alter extension postgis update to '3.1.4';
WARNING: unpackaging raster
WARNING: PostGIS Raster functionality has been unpackaged
HINT: type `SELECT postgis_extensions_upgrade();` to finish the upgrade. After upgrading, if you want to drop raster, run: DROP EXTENSION postgis_raster;
ERROR: permission denied to set parameter "cloudsql.extension_maintenance"
postgres=>
It is not clear to me where to progress further - I cannot find any documentation describing the parameter I am not able to set. I am also not able to run postgis_extensions_upgrade();
Looks like you cannot upgrade to Postgres 14 if you've PostGIS enabled in a previous version on Google Cloud. Found this here: https://cloud.google.com/sql/docs/postgres/upgrade-major-db-version-inplace
Youn should try to upgrade first to Postgres 13 and then upgrade to 14, however I would strongly suggest you to contact with Cloud Platform Support if the problem persists as it is likely that you will need help from the product team to unlock this issue.
Encountered the same issue, looks like you can't upgrade to pg14 if you have postgis enabled in versions older than 12. I was able to upgrade from pg12 to pg14 without issues, but encountered this when upgrading pg11 to pg14.

How to connect mapguide maestro to postgresql/postgis

I’m trying to connect my database postgresql/postgis to mapguide maestro but it send me a error message.
Do you have some idea about this, or can you help me about how can I connect it with my database postgis? I’m using postgresql 9.4, mapguide open source 2.6.1 and mapguide maestro 6.0
You are probably connecting to a PostgreSQL database without PostGIS installed.
Either install PostGIS to that database (e.g. CREATE EXTENSION postgis), or modify your connection settings to the correct host/port/dbname with an existing PostGIS installation.

PostgreSQL ERROR: Could not load library postgis-2.1.dll

I'm using pgAdmin III to connect to my PostgreSQL database (Postgres) and I'm trying to add an extension to the database which is Postgis.
Even though the "missing" file is in the folder the following message error shows:
"ERROR: Could not load library "C:/Program Files/PostGreSQL/9.4/lib/postgis-2.1.dll": unknown error 193."
Can anyone help me?
The windows version is not mentioned. With win 7 check wether postgis is installed. Remove it. From http://download.osgeo.org/postgis/windows/ get the right postgis installer and install new, then start in pgadmin with 'create extension postgis;'.
For me, the error "unknown error 193" occured since I installed a 64-bit version of PostgreSQL but tried to use the 32-bit version of PostGIS (somewhere I read that the 64-bit version would not work properly, but that was in 2011 and now it does).
For me it finally worked when I:
1. removed the existing PostGIS installation (Control Panel -> Programs)
2. shutdown the PostgreSQL service
3. installed the 64-bit version of PostGIS (2.1.3, Postgre in 9.3)
4. restarted the PostgreSQL service
5. installed the extension via PgAdmin III

Flyway: Support for older DB's

I'm currently trying to set up some simple migration scripts for our databases. I was checking flyway, which seems to be simple enough for what I need. My problem is that, for Postgres, only version 9 is supported (we're using 8.4). Is it possible to work around/fix this limitation somehow, or should I start looking for other options?
Edit: I forgot to mention that when I run something like mvn flyway:status, I get the error message:
Flyway Error: java.lang.IllegalArgumentException: Unsupported Database: PostgreSQL
I can connect to the DB via psql, and I'm using the correct jdbc driver, so when I saw the requirements page in the documentation, I assumed that the version was explicitly checked by flyway.
What limitations do you encounter? Flyway is only tested on PostgreSQL version 9.0, that's it. It's not said that older PostgreSQL versions don't work. Just give it a try.
You could also setup a PostgreSQL 9.0 installation on your testbox to see if there is any difference.

No liblwgeom when using postgresql84 and postgis on Snow Leopard with MacPorts

I'm trying to get my dev environment back up and running after upgrading to Snow Leopard. In particular, I need postgresql and postgis working, but I'm running into the following problem.
After installing both with the following:
sudo port install postgresql84 postgresql84-server postgis
I get errors like the following when I try to load my sql database, which has references to liblwgeom.so
ERROR: function public.box3d_in(cstring) does not exist
ERROR: incompatible library "/usr/local/pgsql/lib/liblwgeom.so": version mismatch
DETAIL: Server is version 8.4, library is version 8.3.
That file does exist on my computer, but must be sitting around from an old install of postgresql 8.3. The problem is I can't figure out where liblwgeom.so is supposed to come from. It's not included in postgis 1.4, and a Google search is leaving me scratching my head. Any ideas?
liblwgeom.so comes with PostGIS vesion 1.3. It has been renamed in 1.4. It looks like your dump is of a database with PostGIS 1.3 and you're trying to reload in PostGIS 1.4. This is not supported.
See the PostGIS manual on upgrading for details on what to do.
Update your ports:
sudo port selfupdate
Then install postgis 1.4, which will work for postgresql 8.4
sudo port install postgis