From: Tom Lane <tgl@sss.pgh.pa.us>
To: depesz@depesz.com
Cc: pgsql-bugs@postgresql.org
Subject: Re: psql doesn't reuse -p after backend fail
Date: Mon, 05 Sep 2011 14:27:23 -0400
Message-ID: <11444.1315247243@sss.pgh.pa.us> (raw)
In-Reply-To: <20110905174633.GA7752@depesz.com>
References: <20110905174633.GA7752@depesz.com>
hubert depesz lubaczewski <depesz@depesz.com> writes:
> 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"?
> !>
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.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, depesz@depesz.com
Subject: Re: psql doesn't reuse -p after backend fail
In-Reply-To: <11444.1315247243@sss.pgh.pa.us>
References: <20110905174633.GA7752@depesz.com> <11444.1315247243@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox