Re: [HACKERS] DROP TABLE inside a transaction block

Mike Mascari <mascarm@mascari.com>

From: Mike Mascari <mascarm@mascari.com>
To: Bruce Momjian <pgman@candle.pha.pa.us>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Philip Warner <pjw@rhyme.com.au>, Lamar Owen <lamar.owen@wgcr.org>, Peter Eisentraut <peter_e@gmx.net>, Tatsuo Ishii <t-ishii@sra.co.jp>, pgsql-hackers@postgreSQL.org
Date: 2000-03-08T08:07:45Z
Lists: pgsql-hackers
Can I throw one more question out there on this subject?

There's something that I view as inconsistent behavior with
respect to DDL statements and MVCC and was wondering if this
would have any impact on the discussion (the following is with
6.5.3):

Session #1:

emptoris=> begin;
BEGIN
emptoris=> select * from test;
value
-----
    1
(1 row)

Session #2:

emptoris=> begin;
BEGIN
emptoris=> select * from test;
value
-----
    1
(1 row)

Session #1:

emptoris=> drop table test;
DROP

Session #2:

emptoris=> select * from test;
ERROR:  mdopen: couldn't open test: No such file or directory

Now it would seem to me that if DROP TABLE is going to be
ROLLBACK-able, then Session #2, in a MVCC environment should
never see:

ERROR:  mdopen: couldn't open test: No such file or directory

but it does, because the "effect" of the drop table is an action
that is seen by all sessions, as though it were "committed". So I
am now wondering, are there any
Multi-Versioning/Multi-Generational RDBMS that support
ROLLBACK-able DDL statements in transactions...

Just curious,

Mike Mascari