Re: Question regarding psql or libpq - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Question regarding psql or libpq
Date
Msg-id 21621.1292514263@sss.pgh.pa.us
Whole thread Raw
In response to Re: Question regarding psql or libpq  (Magnus Hagander <magnus@hagander.net>)
List pgsql-hackers
Magnus Hagander <magnus@hagander.net> writes:
> On Thu, Dec 16, 2010 at 16:22, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Two connections are not really a problem IMO, so I would not be in favor
>> of kluging the API to the extent required by solution (B).

> (B) could be as simple as a callback asking for it, though, couldn't
> it? That seems a lot simpler (at least in the API) than trying to
> support hanging on to half-connected connections.

What's the point?  You'll still need a retry loop around the connection
operation, in case of wrong response or too slow response.

I would also argue that holding a connection open for many seconds
while the user enters a password is not a net conservation of resources
compared to trying again, ie, the premise of Tatsuo-san's complaint is
dubious to begin with.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Crash on attempt to connect to nonstarted server
Next
From: Tom Lane
Date:
Subject: Re: Re: Proposed Windows-specific change: Enable crash dumps (like core files)