Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id A3FCCB5DC16 for ; Tue, 6 Sep 2011 12:50:03 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 15930-03 for ; Tue, 6 Sep 2011 15:49:56 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from momjian.us (momjian.us [70.90.9.53]) by mail.postgresql.org (Postfix) with ESMTP id 7BA47B5DC12 for ; Tue, 6 Sep 2011 12:49:56 -0300 (ADT) Received: (from bruce@localhost) by momjian.us (8.11.6/8.11.6) id p86Fnmt15259; Tue, 6 Sep 2011 11:49:48 -0400 (EDT) From: Bruce Momjian Message-Id: <201109061549.p86Fnmt15259@momjian.us> Subject: Re: psql doesn't reuse -p after backend fail In-Reply-To: <7375.1315323343@sss.pgh.pa.us> To: Tom Lane Date: Tue, 6 Sep 2011 11:49:48 -0400 (EDT) CC: depesz@depesz.com, pgsql-bugs@postgresql.org X-Mailer: ELM [version 2.4ME+ PL124 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="US-ASCII" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.404 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RP_MATCHES_RCVD=-0.504 X-Spam-Level: X-Archive-Number: 201109/44 X-Sequence-Number: 31061 Tom Lane wrote: > hubert depesz lubaczewski writes: > > On Mon, Sep 05, 2011 at 02:27:23PM -0400, Tom Lane wrote: > >> It's not just the port, it's all the connection parameters --- > >> do_connect relies on the PGconn object to remember those, and in this > >> case there no longer is a PGconn object. > >> > >> We could have psql keep that information separately, but I'm not sure > >> it's really worth the trouble. > > > well, I think it's definitely worth the trouble. > > [ shrug.. ] So submit a patch. Personally I don't think the case comes > up often enough to be worth the trouble, and I'd much rather spend > development time on preventing the server from crashing in the first > place. Should we document this somewhere? -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. +