0

I'm trying to deploy a PostGIS cluster using Postgres-XL on AWS, for this I have the next architecture:

SO: ubuntu
1 GTM (172.31.45.190)
1 Coordinator (172.31.45.191)
2 Datanodes (172.31.45.192 and 172.31.45.193)

I had my cluster running but I can't manage to make PostGIS work, I tried the installation with sudo apt-get install postgis but when I try to create the extension inside my db (CREATE EXTENSION postgis;) I got the next error:

ERROR:  could not open extension control file "/usr/local/pgsql/share/extension/postgis.control": No such file or directory

The postgis.control file installed by apt-get is in: "/usr/share/postgresql/9.5/extension/postgis.control" so I think is just a problem with the paths but I'm a little lost on that configuration

Thank you in advance for any help!

Federico Grandi
  • 6,785
  • 5
  • 30
  • 50

2 Answers2

1

In case anyone is running in this issue, I solved following this steps:

  1. Install Postgres-xl and PostGIS dependencies to compile (Be sure to install the package postgresql-server-dev-9.5 in this step, otherwise it's going to brake your postgres-xl installation)
  2. Build and install Postgres-XL with ./configure -prefix=/usr/lib/postgresql/9.5
  3. Build and install PostGIS
  4. Start your cluster
0

You're using a version of PostgreSQL (in this case PostgreSQL-XL) that was installed from somewhere other than the Ubuntu repositories (similar to this issue). The /usr/local/pgsql/share is the configured $SHAREDIR for your installation of PostgreSQL. The default on Ubuntu for PostgreSQL 9.5 should be /usr/share/postgresql/9.5. As far as I can tell $SHAREDIR is configured at compile time and can't easily be changed.

PostGIS gets compiled against the version of PostgreSQL it's going to be used against. So in this case the Ubuntu version of PostGIS isn't going to be compatible with the version of PostgreSQL-XL you're running.

You have two options for fixing the issue:

  • Install PostgreSQL from the Ubuntu software repository (make sure you back up your database first!) and use that instead of PostgreSQL-XL.
  • Install PostGIS manually into PostgreSQL-XL.
Michael Powers
  • 1,970
  • 1
  • 7
  • 12