Re: Ye olde drop-the-database-you-just-left problem
- From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
- To: Brian Hurt <bhurt(at)janestcapital(dot)com>
- Cc: pgsql-hackers(at)postgreSQL(dot)org
- Subject: Re: Ye olde drop-the-database-you-just-left problem
- Date: Wed, 30 May 2007 14:01:44 -0400
- Message-id: <6181.1180548104@sss.pgh.pa.us> <text/plain>
Brian Hurt <bhurt(at)janestcapital(dot)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
Home |
Main Index |
Thread Index