Re: PGDATA confusion - Mailing list pgsql-docs

From Tom Lane
Subject Re: PGDATA confusion
Date
Msg-id 519.1365951046@sss.pgh.pa.us
Whole thread Raw
In response to Re: PGDATA confusion  (Thom Brown <thom@linux.com>)
List pgsql-docs
Thom Brown <thom@linux.com> writes:
> I've found another unfortunate inconsistency.

> PGDATA is not necessarily the same location in these 2 commands:

> pg_ctl start -D DATADIR
> pg_ctl stop -D DATADIR

> The first one requires that the postgresql.conf file be located in the
> specified directory.  The second one needs to find the pid file.  On
> Debian/Ubuntu/Linux Mint/Gentoo (and probably most other Linux
> distros), it would mean 2 different locations for each:

> pg_ctl start -D /etc/postgresql/9.2/main/
> pg_ctl stop -D /var/lib/postgresql/9.2/main/

This is one of the reasons why an external config file isn't as great
an idea as some people think.

I wonder whether we shouldn't simply remove the ability for
postgresql.conf to exist outside the data directory (which would be
mechanized by removing the ability to set data_directory to something
other than the place where the config file is found).  People who prefer
to keep their config somewhere else can reduce the in-the-directory file
to just "include /some/other/file".  But otherwise, this would get rid
of a confusing and completely unnecessary inconsistency between
different installations.

            regards, tom lane


pgsql-docs by date:

Previous
From: Thom Brown
Date:
Subject: Re: PGDATA confusion
Next
From: Adam Vande More
Date:
Subject: Data Partition Encryption documentation