[Pkg-postgresql-public] Bug#819442: Bug#819442: postgresql-common: pg_ctlcluster fails if data directory is not in the standard place

Oliver Elphick olly at lfix.co.uk
Fri Nov 25 20:44:53 UTC 2016


On Thu, 2016-11-24 at 15:33 +0100, Christoph Berg wrote:
> 
> pg_ctlcluster does pass "-c config_file" to pg_ctl (and in turn to
> postgres), which I believe has been the state of affairs since
> postgresql-common was invented (and possibly even before that, when
> your name was still on the postgresql packages :D). Non-standard
> PGDATA locations are supported and generally work.
> 
> So the problem must have been elsewhere in the interaction of
> postgresql-common with your setup. Can you still reproduce it?

Yes. I am now on 9.6 and it is still happening.

The problem is in specifying -D with the wrong path as a result of
reading the config file for the location of the data directory. -D
actually specifies the location of the config file. The package seems
to be treating -D as specifying the data directory.

$ man pg_ctl
...
   -D datadir
   --pgdata datadir
      Specifies the file system location of the database configuration
      files. If this is omitted, the environment variable PGDATA is
      used.



More information about the Pkg-postgresql-public mailing list