Re: pg_ctl -w start does not know that it has started postmaster - Mailing list pgsql-bugs

From Tom Lane
Subject Re: pg_ctl -w start does not know that it has started postmaster
Date
Msg-id 18508.1101158175@sss.pgh.pa.us
Whole thread Raw
In response to pg_ctl -w start does not know that it has started postmaster  (Aaron Hillegass <aaron@bignerdranch.com>)
List pgsql-bugs
Aaron Hillegass <aaron@bignerdranch.com> writes:
> I have a script that must start the postmaster before continuing, so I
> do this:

> sudo -u postgres /Library/PostgreSQL/bin/pg_ctl -w start

This is not going to work very well because sudo doesn't update the
environment --- for example if PGUSER is set in your environment then
that's the username pg_ctl will try to use to connect with.  Perhaps
try

sudo su -l postgres -c '/Library/PostgreSQL/bin/pg_ctl -w start'

            regards, tom lane

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Data corruption/loss when altering tables (fwd)
Next
From: Michael Fuhr
Date:
Subject: Re: Data corruption/loss when altering tables (fwd)