Re: pg_ctl -w start does not know that it has started postmaster

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Aaron Hillegass <aaron(at)bignerdranch(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: pg_ctl -w start does not know that it has started postmaster
Date: 2004-11-22 21:16:15
Message-ID: 18508.1101158175@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Aaron Hillegass <aaron(at)bignerdranch(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Nicola Pero 2004-11-22 21:34:27 Re: Data corruption/loss when altering tables (fwd)
Previous Message Tom Lane 2004-11-22 20:44:25 Re: Data corruption/loss when altering tables (fwd)