From: | "Dan Armbrust" <daniel(dot)armbrust(dot)list(at)gmail(dot)com> |
---|---|
To: | "Scott Marlowe" <scott(dot)marlowe(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:28:18 |
Message-ID: | 82f04dc40810170728l566ae4b2u239d71616b45755b@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
But there is no user2. I _know_ I am the only user of this database.
So how can User 1 create a race condition by himself?
Or is this something PostgreSQL is doing internally (like vacuum) ?
Do I really just have to keep trying the DROP command N times in a
row, until it decides it wants to work? That really doesn't seem
right.
Thanks,
Dan
On Fri, Oct 17, 2008 at 9:24 AM, Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com> wrote:
> 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;
>
From | Date | Subject | |
---|---|---|---|
Next Message | André Volpato | 2008-10-17 14:28:28 | VACUUM PANIC: corrupted item pointer |
Previous Message | Alvaro Herrera | 2008-10-17 14:28:05 | Re: Annoying Reply-To |