Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UROGl-00007K-0c for pgsql-docs@arkaria.postgresql.org; Sun, 14 Apr 2013 14:51:03 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UROGk-0000oO-6I for pgsql-docs@arkaria.postgresql.org; Sun, 14 Apr 2013 14:51:02 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UROGi-0000oG-C9 for pgsql-docs@postgresql.org; Sun, 14 Apr 2013 14:51:00 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UROGb-0006zh-F8 for pgsql-docs@postgresql.org; Sun, 14 Apr 2013 14:50:59 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id r3EEok0I000520; Sun, 14 Apr 2013 10:50:46 -0400 (EDT) From: Tom Lane To: Thom Brown cc: Bruce Momjian , pgsql-docs Subject: Re: PGDATA confusion In-reply-to: References: <201111041632.pA4GWDH15361@momjian.us> <20120816030021.GI8353@momjian.us> Comments: In-reply-to Thom Brown message dated "Sun, 14 Apr 2013 08:56:12 +0100" Date: Sun, 14 Apr 2013 10:50:46 -0400 Message-ID: <519.1365951046@sss.pgh.pa.us> X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org Thom Brown 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 -- Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs