Re: Ye olde drop-the-database-you-just-left problem - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Ye olde drop-the-database-you-just-left problem
Date
Msg-id 6181.1180548104@sss.pgh.pa.us
Whole thread Raw
In response to Re: Ye olde drop-the-database-you-just-left problem  (Brian Hurt <bhurt@janestcapital.com>)
Responses Re: Ye olde drop-the-database-you-just-left problem  (Josh Berkus <josh@agliodbs.com>)
List pgsql-hackers
Brian Hurt <bhurt@janestcapital.com> writes:
> Tom Lane wrote:
>> I just finished giving someone the standard advice to wait a bit before
>> trying to drop a database that'd just been accessed:
>> http://archives.postgresql.org/pgsql-general/2007-05/msg01505.php

> Is this a synchronization issue?

The problem is that the user thinks his previous disconnect is finished
when it may not be --- it's entirely possible in fact that his old
backend hasn't even received the disconnect message yet.  So I don't
think it's possible to rely on there being a state change inside the
database indicating that the other guy is about to exit.

Even if we had a semaphore of the sort you suggest, I doubt people would
want DROP DATABASE to wait indefinitely.  The real question here is how
long is it reasonable for DROP DATABASE to wait before failing ...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: TOAST usage setting
Next
From: Zoltan Boszormenyi
Date:
Subject: New cast between inet/cidr and bytea