Re: Finding the bin path - Mailing list pgsql-general

From Craig Ringer
Subject Re: Finding the bin path
Date
Msg-id 4B37FB12.4050507@postnewspapers.com.au
Whole thread Raw
In response to Re: Finding the bin path  (Rob Jaeger <yogirob@gmail.com>)
List pgsql-general
On 27/12/2009 2:12 PM, Rob Jaeger wrote:

> I don't quite follow Greg Smith's reply of 'try guess based on "which
> postmaster"' (can you clarify?)

He's talking about UNIX systems. This will not help you.

> But - I think I have found what I need! I can do a "SHOW
> data_directory;" and then from there I can snoop inside the
> postmaster.opts file to get the bin path. The question I have now is -
> is this method safe? Is this file present in all platform data
> directories. (I'm using Win7)

It looks like it's present on all platforms. There are the contents for
my Debian (Linux) system:

/usr/lib/postgresql/8.4/bin/postgres "-D" "/var/lib/postgresql/8.4/main"
"-c" "config_file=/etc/postgresql/8.4/main/postgresql.conf"

The release notes say that postmaster.opts was added in 7.0, so it'll be
present for any version remotely new enough to still be in reasonable use.

--
Craig Ringer

pgsql-general by date:

Previous
From: John R Pierce
Date:
Subject: Re: Finding the bin path
Next
From: Craig Ringer
Date:
Subject: Re: Finding the bin path