Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TNRf8-0002ao-Kn for pgsql-bugs@postgresql.org; Sun, 14 Oct 2012 17:07:38 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TNRf6-00086E-3I for pgsql-bugs@postgresql.org; Sun, 14 Oct 2012 17:07:37 +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 q9EH7XfE027234; Sun, 14 Oct 2012 13:07:33 -0400 (EDT) From: Tom Lane To: Josh Kupershmidt cc: Thom Brown , pgsql-bugs Subject: Re: pg_ctl restart issue with relative paths In-reply-to: References: Comments: In-reply-to Josh Kupershmidt message dated "Sun, 14 Oct 2012 09:56:46 -0700" Date: Sun, 14 Oct 2012 13:07:33 -0400 Message-ID: <27233.1350234453@sss.pgh.pa.us> X-Pg-Spam-Score: -2.3 (--) X-Archive-Number: 201210/129 X-Sequence-Number: 34429 Josh Kupershmidt writes: > On Sat, Oct 13, 2012 at 3:56 PM, Thom Brown wrote: >> I have noticed that, using pg_ctl, if you start Postgres using a >> relative path, then attempt to restart it from anywhere else, it >> fails. > Yeah, I was complaining about the same problem here: > http://archives.postgresql.org/pgsql-bugs/2011-10/msg00210.php I just re-read that thread, and it occurred to me that there is another way to fix the problem: what we need is either for postmaster.opts to not store the -D option at all, or for pg_ctl restart to override that option with its freshly-derived idea of where the data directory is. This would avoid my allergy to the idea of storing an absolute-ified path, which I'm still down on because it would have failure modes of its own. regards, tom lane