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

Re: When "psql -l" is invoked from prompt and not completed,

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Adrian Calvin <acexec(at)yahoo(dot)com>,pgsql-bugs-owner(at)postgresql(dot)org, pgsql-bugs(at)postgresql(dot)org
Subject: Re: When "psql -l" is invoked from prompt and not completed,
Date: 2003-07-24 22:12:48
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)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                        |
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

In response to

pgsql-bugs by date

Next:From: Tim McAuleyDate: 2003-07-25 10:20:08
Subject: casting timeofday to timestamp broken under cygwin
Previous:From: Tom LaneDate: 2003-07-24 22:07:46
Subject: Re: When "psql -l" is invoked from prompt and not completed,

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