dbTalk Databases Forums  

[BUGS] Race condition in dropdb;createdb

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


Discuss [BUGS] Race condition in dropdb;createdb in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Jim C. Nasby
 
Posts: n/a

Default [BUGS] Race condition in dropdb;createdb - 10-03-2005 , 05:39 PM






decibel (AT) phonebook (DOT) 1[17:32]~:1%createdb test;
CREATE DATABASE
decibel (AT) phonebook (DOT) 1[17:32]~:2%dropdb test; createdb test;
DROP DATABASE
createdb: database creation failed: ERROR: source database "template1"
is being accessed by other users
decibel (AT) phonebook (DOT) 1[17:32]~:3%

I realize that the changes made in 8.1 WRT using the postgres database
fix this particular case, but is there a bigger issue with there being a
race condition here? Presumably dropdb returns before the connection is
actually closed from the database's standpoint...
--
Jim C. Nasby, Sr. Engineering Consultant jnasby (AT) pervasive (DOT) com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

---------------------------(end of broadcast)---------------------------
TIP 4: 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.