Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] Fix PID file location?

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)surnet(dot)cl>, josh(at)agliodbs(dot)com,PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] Fix PID file location?
Date: 2005-05-28 02:21:19
Message-ID: 200505280221.j4S2LJT06305@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
Tom Lane wrote:
> Alvaro Herrera <alvherre(at)surnet(dot)cl> writes:
> > On Fri, May 27, 2005 at 07:40:17PM -0400, Tom Lane wrote:
> >> I really think we have only two choices: teach pg_ctl how to dig the
> >> data directory location out of postgresql.conf,
> 
> > I don't think this is extremely hard, isn't it?
> 
> One small problem is that I think the current definition allows the data
> directory to be specified relative to the original postmaster working
> directory.  Of course, that's not different from "-D ." on the
> postmaster command line, so possibly the answer is "if you want to use
> pg_ctl, don't do that".

I don't see any way to accurately find the data directory location. 
Reading postgresql.conf is one way, but what if they set data_directory
on the command line using postmaster -o?  Is reading postgresql.conf
from pg_ctl without a parser really accurate?  Shame we can't attach and
do "SHOW data_directory" on a backend.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

In response to

Responses

pgsql-hackers by date

Next:From: Michael FuhrDate: 2005-05-28 02:54:12
Subject: INOUT/OUT problems with IMMUTABLE
Previous:From: Tom LaneDate: 2005-05-28 00:40:30
Subject: Re: [HACKERS] Fix PID file location?

pgsql-patches by date

Next:From: Bruce MomjianDate: 2005-05-28 02:35:13
Subject: Re: AllocSetReset improvement
Previous:From: Tom LaneDate: 2005-05-28 00:45:47
Subject: Re: psql backslash consistency

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group