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

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

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: depesz(at)depesz(dot)com
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: psql doesn't reuse -p after backend fail
Date: 2011-09-08 10:09:22
Message-ID: 1315476562.17143.0.camel@fsopti579.F-Secure.com (view raw or flat)
Thread:
Lists: pgsql-bugs
On tis, 2011-09-06 at 17:12 +0200, hubert depesz lubaczewski wrote:
> 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. If I had datbaase
> standing at 5432, it would connect to it, and then I could mistakenly
> ran commands to wrong database.
> this is clearly not a good thing.

Perhaps just prevent \connect without argument if the information is no
longer available.


In response to

Responses

pgsql-bugs by date

Next:From: Daniel FarinaDate: 2011-09-08 22:33:37
Subject: BUG #6200: standby bad memory allocations on SELECT
Previous:From: John R PierceDate: 2011-09-07 19:02:07
Subject: Re: In Windows Server 2008 PostgreSQL8.3 service on Local Computer started and then stopped.

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