Re: [HACKERS] DROP TABLE inside a transaction block - Mailing list pgsql-hackers

From Mike Mascari
Subject Re: [HACKERS] DROP TABLE inside a transaction block
Date
Msg-id 38C60A51.43B7BF5@mascari.com
Whole thread Raw
In response to Re: [HACKERS] DROP TABLE inside a transaction block  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: [HACKERS] DROP TABLE inside a transaction block
Re: [HACKERS] DROP TABLE inside a transaction block
RE: [HACKERS] DROP TABLE inside a transaction block
List 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


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] DROP TABLE inside a transaction block
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] DROP TABLE inside a transaction block