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

Re: Ye olde drop-the-database-you-just-left problem

From: Jim Nasby <decibel(at)decibel(dot)org>
To: Zeugswetter Andreas ADI SD <ZeugswetterA(at)spardat(dot)at>
Cc: "Brian Hurt" <bhurt(at)janestcapital(dot)com>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: Ye olde drop-the-database-you-just-left problem
Date: 2007-06-01 23:42:24
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On May 31, 2007, at 1:32 AM, Zeugswetter Andreas ADI SD wrote:
>>>  However, it suddenly struck me that we could
>>> probably make most of the problem go away if we put that same wait
> into
>>> DROP DATABASE itself --- that is, if we see other backends in the
>>> target DB, sleep for a second or two and then recheck before  
>>> erroring
> out.
> Yup, waiting in drop database up to 10-30 secs would imho be fine.

Even 10 seconds seems rather long, doesn't it? You'd have to have an  
awfully busy system to need to wait more than like 5 seconds for the  
closing backend to get scheduled, and it'd be rather ugly to force  
someone to wait 30 seconds just to find out that someone's still  
connected to the database.

How about starting with 5 seconds and seeing if that takes care of  
most situations?
Jim Nasby                                            jim(at)nasby(dot)net
EnterpriseDB      512.569.9461 (cell)

In response to


pgsql-hackers by date

Next:From: Tom LaneDate: 2007-06-01 23:46:48
Subject: Re: BufFileWrite across MAX_PHYSICAL_FILESIZE boundary
Previous:From: Tom LaneDate: 2007-06-01 22:58:18
Subject: Re: [HACKERS] like/ilike improvements

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