Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id DC940B5FDCF for ; Mon, 5 Sep 2011 15:03:15 -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 75481-02 for ; Mon, 5 Sep 2011 18:03:08 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from depesz.com (andy.depesz.com [88.198.47.100]) by mail.postgresql.org (Postfix) with ESMTP id 396C2B5DFAA for ; Mon, 5 Sep 2011 14:46:34 -0300 (ADT) Received: from andy.depesz.com ([88.198.47.100] helo=depesz.com) by depesz.com with esmtpa (Exim 4.76) (envelope-from ) id 1R0dFh-0002kp-NE for pgsql-bugs@postgresql.org; Mon, 05 Sep 2011 19:46:33 +0200 Date: Mon, 5 Sep 2011 19:46:33 +0200 From: hubert depesz lubaczewski To: pgsql-bugs@postgresql.org Subject: psql doesn't reuse -p after backend fail Message-ID: <20110905174633.GA7752@depesz.com> Reply-To: depesz@depesz.com MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) 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/31 X-Sequence-Number: 31048 hi, pg version: 9.0.5 - head from 9.0 branch in git. ran psql with specyfying port: psql -p 4329 -U postgres -d some_database then I run query which breaks backend: =# select * from categories limit 1; The connection to the server was lost. Attempting reset: Failed. !> When I'll try to re-issue \c some_database now, I got: !> \c some_database could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"? !> Clearly it is looking for socket on port 5432, which is bad, because I explicitly specified the port to be 4329. before backend crash, \c works normally. Best regards, depesz -- The best thing about modern society is how easy it is to avoid contact with it. http://depesz.com/