Re: Drop database / database in use question

From: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
To: "Dan Armbrust" <daniel(dot)armbrust(dot)list(at)gmail(dot)com>
Cc: "pgsql general" <pgsql-general(at)postgresql(dot)org>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: Drop database / database in use question
Date: 2008-10-17 14:24:49
Message-ID: dcc563d10810170724o13ec9611g5b0dcc857c845111@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Oct 17, 2008 at 8:11 AM, Dan Armbrust
<daniel(dot)armbrust(dot)list(at)gmail(dot)com> wrote:
>> There are obvious race conditions in that assumption. Why don't you
>> just try the drop and see if it succeeds?
>>
>> regards, tom lane
>>
>
> I don't follow - why is there a race condition? I'm driving the
> commands into postgresql via the command line.

User 1: select * from pg_stat_activity where datname='db123';
User 2: psql db123
User 1: drop database db123;

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rainer Pruy 2008-10-17 14:26:59 Re: Annoying Reply-To
Previous Message Martin Gainty 2008-10-17 14:24:44 Re: Annoying Reply-To