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

Dropping tables...

From: Vadim Mikheev <vadim(at)krs(dot)ru>
To: Andreas Zeugswetter <andreas(dot)zeugswetter(at)telecom(dot)at>
Cc: "'hackers(at)postgresql(dot)org'" <hackers(at)postgresql(dot)org>, "Dr(dot) Michael Meskes" <meskes(at)online-club(dot)de>
Subject: Dropping tables...
Date: 1998-07-31 16:05:52
Message-ID: 35C1EB60.6C044496@krs.ru (view raw or flat)
Thread:
Lists: 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

In response to

  • at 1998-07-31 08:06:07 from Andreas Zeugswetter

Responses

pgsql-hackers by date

Next:From: Vince VielhaberDate: 1998-07-31 16:55:25
Subject: Re: [HACKERS] OR clause status report
Previous:From: Vadim MikheevDate: 1998-07-31 15:29:20
Subject: Re: [HACKERS] OR clause status report

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