Re: BUG #5276: pg_ctl reads data directory on -D instead of postgresql.conf directoryh

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "James Bellinger" <jfb(at)zer7(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5276: pg_ctl reads data directory on -D instead of postgresql.conf directoryh
Date: 2010-01-14 16:11:03
Message-ID: 24490.1263485463@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"James Bellinger" <jfb(at)zer7(dot)com> 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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2010-01-14 16:30:40 Re: BUG #5277: plperl can't get args properly
Previous Message Tom Lane 2010-01-14 15:44:49 Re: BUG #5269: postgres backend terminates with SIGSEGV