I am trying to install the postgis extension on my database, which resides on a web hosting service. The problem is that the control files seem to have to be found in /package/host/localhost/postgresq-9.3.2-1. I am using a hosting company where all we can access is what is in our respective home/ folders. The Postgres executables are found in the root directories which we cannot access.

I have successfully installed the PostGIS binaries, but now when I try to create the extension with CREATE EXTENSION postgis, I get the error ERROR: could not open extension control file /package/host/localhost/postgresql-9.3.2-1/share/extension/postgis.control. I cannot write anything to this directory since it is just intended to store the executables for anyone to access via some scripts the hosting provider as set up.

Can I have this .control file be somewhere else instead? Or am I just out of luck entirely?

  • 5
    Have you tried to ask your hosting company? They are definitely in the position of being able to help you. – dezso May 15 '18 at 13:08
  • 4
    I'm voting to close this question as off-topic because it should be rather a vendor support request. – dezso May 15 '18 at 13:09
  • Well I just wanted to know if it was possible to use an "off site" control file in the first place – wfgeo May 15 '18 at 13:10
  • As it sounds, you (postgres, maybe) don't have permissions on the file, so even if there were a way, you would be out of luck. – dezso May 15 '18 at 13:12

This is not 100% proven, but the following pass of the documentation suggests you just cannot have your control files in other locations:


The name of the extension to be installed. PostgreSQL will create the extension using details from the file SHAREDIR/extension/extension_name.control.

I can imagine one can work it around on systems supporting symbolic links - but in your case this does not help as well, as you cannot create the symlink at the right location either.

Not the answer you're looking for? Browse other questions tagged or ask your own question.