Re: PGDATA confusion

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Thom Brown <thom(at)linux(dot)com>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, pgsql-docs <pgsql-docs(at)postgresql(dot)org>
Subject: Re: PGDATA confusion
Date: 2013-04-14 14:50:46
Message-ID: 519.1365951046@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

Thom Brown <thom(at)linux(dot)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

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message Adam Vande More 2013-04-18 20:16:47 Data Partition Encryption documentation
Previous Message Thom Brown 2013-04-14 07:56:12 Re: PGDATA confusion