Dropping tables... - Mailing list pgsql-hackers

From Vadim Mikheev
Subject Dropping tables...
Date
Msg-id 35C1EB60.6C044496@krs.ru
Whole thread Raw
In response to ...  (Andreas Zeugswetter <andreas.zeugswetter@telecom.at>)
Responses Re: Dropping tables...
List pgsql-hackers
Andreas Zeugswetter wrote:
>
> I would say allow the drop table, of course only if no update or
> intent update (select for update) lock is on it.
> This is how Informix behaves. Otherwise it will become very
> hard to drop tables altogether.

Ok, currently, table can't be dropped if SELECTed by another
running transaction.

Would we like to change this ?!

Comments?

---

Also, I have yet another test for Oracle locking/table
dropping - help me please:

CREATE TABLE test (x integer, y integer);
INSERT INTO test VALUES (1, 1);

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

3. Now again in session T1

   DROP TABLE test;

   -- will be this blocked ?

TIA,
    Vadim

pgsql-hackers by date:

Previous
From: Vadim Mikheev
Date:
Subject: Re: [HACKERS] OR clause status report
Next
From: Vince Vielhaber
Date:
Subject: Re: [HACKERS] OR clause status report