Re: Dropping tables... - Mailing list pgsql-hackers

From Dr. Michael Meskes
Subject Re: Dropping tables...
Date
Msg-id 19980802133913.A273@feivel.online-club.de
Whole thread Raw
In response to Dropping tables...  (Vadim Mikheev <vadim@krs.ru>)
List pgsql-hackers
On Sat, Aug 01, 1998 at 12:05:52AM +0800, Vadim Mikheev wrote:
> 1. In session T1 run
>
>    LOCK TABLE test IN EXCLUSIVE MODE;
>
> 2. In session T2 run
>
>    UPDATE test SET y = 0 WHERE x = 0;
>
>    -- shouldn't be blocked by T1 if ROW EXCLUSIVE
>    -- lock is acquired by T2 only when row found

But it indeed is blocked.

> 3. Now again in session T1
>
>    DROP TABLE test;
>
>    -- will be this blocked ?

DROP TABLE test
           *
ERROR at line 1:
ORA-00054: resource busy and acquire with NOWAIT specified

However, after this, the update call is executed. After a commit in T2, test
can be dropped.

Michael
--
Dr. Michael Meskes        meskes@online-club.de, meskes@debian.org
Go SF49ers! Go Rhein Fire!    Use Debian GNU/Linux!

pgsql-hackers by date:

Previous
From: "Thomas G. Lockhart"
Date:
Subject: Re: [HACKERS] TODO item: make pg_shadow updates more robust
Next
From: Bruce Momjian
Date:
Subject: New color flowchart