Re: pg_ctl -w option does not behave as documented

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Daniel Alvarez <alvarez(at)st-oneline(dot)net>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: pg_ctl -w option does not behave as documented
Date: 2002-07-30 18:55:43
Message-ID: 200207301855.g6UIthR08287@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The pg_ctl code has this warning:

# FIXME: This is horribly misconceived.
# 1) If password authentication is set up, the connection will fail.
# 2) If a virtual host is set up, the connection may fail.
# 3) If network traffic filters are set up tight enough, the connection
# may fail.
# 4) When no Unix domain sockets are available, the connection will
# fail. (Using TCP/IP by default ain't better.)
# 5) When a different port is configured, the connection will fail
# or go to the wrong server.
# 6) If the dynamic loader is not set up correctly (for this user/at
# this time), psql will fail (to find libpq).
# 7) If psql is misconfigured, this may fail.
if "$PGPATH/psql" -l >/dev/null 2>&1

Feel free to send over a patch. ;-)

---------------------------------------------------------------------------

Daniel Alvarez wrote:
> PostgreSQL 7.2.1 / SUSE Linux 8.0
>
> According to the output of "pg_ctl --help", the -w option (lowercase)
> should force the frontend to wait until the postmaster's startup completes.
> Instead it prompts for a password, as with the (-W) option (uppercase).
> Ommiting the option, the frontend still blocks until the end of startup.
>
> The behavior described is trivial and I won't bother you with unnecessary details.
> For reproduction, invoke
>
> pg_ctl start -w -l somelog -o "-i" -D somecluster
>
> and you'll be prompted for a password.
>
> This was correctly implemented in version 7.1.3 and may require a
> change in the invocing scripts when upgrading to version 7.2.1.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2002-07-30 19:01:55 Re: Bug #724: Problmes creating aggregate functions in 7.2.1
Previous Message Bruce Momjian 2002-07-30 18:52:47 Re: Patch for Re: [HACKERS] Bug of PL/pgSQL parser