dbTalk Databases Forums  

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

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss Re: [BUGS] When "psql -l" is invoked from prompt and not completed, in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] When "psql -l" is invoked from prompt and not completed, - 07-24-2003 , 04:33 PM






Bruce Momjian <pgman (AT) candle (DOT) pha.pa.us> writes:
Quote:
Adrian Calvin wrote:
When "psql -l" is invoked from prompt, and a user lets it sit
at the 'more' prompt, no other user can create a database. The
"cannot access template..." error is thrown. Has this been
corrected in later versions?

Sorry, I have trouble believing that.
I don't. It's from the interlock that prevents copying a database that
contains active sessions.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html


Reply With Quote
  #2  
Old   
Bruce Momjian
 
Posts: n/a

Default Re: [BUGS] When "psql -l" is invoked from prompt and not completed, - 07-24-2003 , 04:56 PM






Tom Lane wrote:
Quote:
Bruce Momjian <pgman (AT) candle (DOT) pha.pa.us> writes:
Adrian Calvin wrote:
When "psql -l" is invoked from prompt, and a user lets it sit
at the 'more' prompt, no other user can create a database. The
"cannot access template..." error is thrown. Has this been
corrected in later versions?

Sorry, I have trouble believing that.

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 thought the database was
shipped to the client, and the locks released.

--
Bruce Momjian | http://candle.pha.pa.us
pgman (AT) candle (DOT) 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

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo (AT) postgresql (DOT) org)


Reply With Quote
  #3  
Old   
Bruce Momjian
 
Posts: n/a

Default Re: [BUGS] When "psql -l" is invoked from prompt and not completed, - 07-24-2003 , 05:15 PM



Tom Lane wrote:
Quote:
Bruce Momjian <pgman (AT) candle (DOT) 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 (AT) candle (DOT) 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

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.