Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id B15D16330E3 for ; Thu, 14 Jan 2010 12:11:15 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 41854-01 for ; Thu, 14 Jan 2010 16:11:04 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 91D2A632B07 for ; Thu, 14 Jan 2010 12:11:04 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id o0EGB3cm024491; Thu, 14 Jan 2010 11:11:03 -0500 (EST) To: "James Bellinger" cc: pgsql-bugs@postgresql.org Subject: Re: BUG #5276: pg_ctl reads data directory on -D instead of postgresql.conf directoryh In-reply-to: <201001140201.o0E21sr7075150@wwwmaster.postgresql.org> References: <201001140201.o0E21sr7075150@wwwmaster.postgresql.org> Comments: In-reply-to "James Bellinger" message dated "Thu, 14 Jan 2010 02:01:54 +0000" Date: Thu, 14 Jan 2010 11:11:03 -0500 Message-ID: <24490.1263485463@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.459 tagged_above=-10 required=5 tests=AWL=0.140, BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201001/139 X-Sequence-Number: 25643 "James Bellinger" writes: > While on startup, pg_ctl (correctly) looks in the directory specified by -D > for postgresql.conf, and then uses that to determine the data directory, > when stopping it actually expects the directories to be the same and in > doing so looks for the PID file in the given directory. As a result, on > start one needs to use the .conf directory with -D, and on stop the data > directory. Your premise is wrong --- pg_ctl does not read postgresql.conf at any time. It's not intended to be used in a scenario where the data_directory configuration option is being used. There have been previous discussions about trying to teach it to read the config file, but the effort needed seems far out of proportion to the benefits :-( regards, tom lane