Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 79C4DB5DC09 for ; Tue, 6 Sep 2011 12:36:04 -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 88620-03 for ; Tue, 6 Sep 2011 15:35:55 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 1C606B5DBE9 for ; Tue, 6 Sep 2011 12:35:54 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p86FZhIA007376; Tue, 6 Sep 2011 11:35:43 -0400 (EDT) To: depesz@depesz.com cc: pgsql-bugs@postgresql.org Subject: Re: psql doesn't reuse -p after backend fail In-reply-to: <20110906151253.GA1209@depesz.com> References: <20110905174633.GA7752@depesz.com> <11444.1315247243@sss.pgh.pa.us> <20110906151253.GA1209@depesz.com> Comments: In-reply-to hubert depesz lubaczewski message dated "Tue, 06 Sep 2011 17:12:54 +0200" Date: Tue, 06 Sep 2011 11:35:43 -0400 Message-ID: <7375.1315323343@sss.pgh.pa.us> From: Tom Lane 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/42 X-Sequence-Number: 31059 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. regards, tom lane