Re: When "psql -l" is invoked from prompt and not completed, - Mailing list pgsql-bugs

From Bruce Momjian
Subject Re: When "psql -l" is invoked from prompt and not completed,
Date
Msg-id 200307242212.h6OMCmx05819@candle.pha.pa.us
Whole thread Raw
In response to Re: When "psql -l" is invoked from prompt and not completed,  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > Tom Lane wrote:
> >> I don't.  It's from the interlock that prevents copying a database that
> >> contains active sessions.
>
> > I understand that, but why does psql still hold that lock while
> > displaying the database names with more?
>
> I don't think it closes the database connection until it's ready to
> exit.
>
> We could maybe fix -l to close the connection before outputting data,
> but it doesn't seem like that really will make a lot of difference.
> What of someone who's connected to template1 with a plain "psql
> template1" session?

Oh, so it is their connection to template1 that is causing the lock, not
the display of the -l data.  Thanks, got it, and makes sense.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: When "psql -l" is invoked from prompt and not completed,
Next
From: Kenji Sugita
Date:
Subject: libpq.a must be ranlibed after installation