Skip site navigation (1) Skip section navigation (2)

Re: psql doesn't reuse -p after backend fail

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: depesz(at)depesz(dot)com
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: psql doesn't reuse -p after backend fail
Date: 2011-09-05 18:27:23
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
hubert depesz lubaczewski <depesz(at)depesz(dot)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

In response to


pgsql-bugs by date

Next:From: Stefan KaltenbrunnerDate: 2011-09-05 18:44:40
Subject: Re: psql doesn't reuse -p after backend fail
Previous:From: Ashesh VashiDate: 2011-09-05 18:10:52
Subject: Re: BUG #6194: Cannot install any of the installers

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group