On Sun, Dec 12, 2010 at 11:21 PM, Fujii Masao <masao.fujii@gmail.com> wrote:
> On Sat, Dec 11, 2010 at 1:27 PM, Robert Haas <robertmhaas@gmail.com> wrote:
>>>> Notes
>>>>
>>>> Waiting for complete startup is not a well-defined operation and
>>>> might fail if access control is set up so that a local client cannot
>>>> connect without manual interaction (e.g., password authentication).
>>>> For additional connection variables, see Section 31.13, and for
>>>> passwords, also see Section 31.14.
>>>
>>> The above also seems to be obsolete, thanks to recently-introduced
>>> PQping. Can we remove that?
>>
>> Should we remove only the first sentence and keep the second one, or
>> is it more appropriate to remove the whole thing?
>
> At least the reference to section 31.14 is needless since password
> authentication doesn't affect the pg_ctl -w for now. But, on the second
> thought, it can still fail because of miss-configuration of connection
> variable, for example PGHOST.
I thought PQping() was supposed to handle that correctly. There are
four return values: PQPING_OK, PQPING_REJECT, PQPING_NO_RESPONSE,
PQPING_NO_ATTEMPT. I believe the last is intended to cover blatant
misconfiguration. Or maybe I'm not understanding what you're
referring to.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company