BUG #1220: "alter table rename to" inside a transaction violates ACID ordering - Mailing list pgsql-bugs

From PostgreSQL Bugs List
Subject BUG #1220: "alter table rename to" inside a transaction violates ACID ordering
Date
Msg-id 20040817141409.F076A5A1045@www.postgresql.com
Whole thread Raw
Responses Re: BUG #1220: "alter table rename to" inside a transaction violates ACID ordering
List pgsql-bugs
The following bug has been logged online:

Bug reference:      1220
Logged by:          adam sah

Email address:      asah@midgard.net

PostgreSQL version: 7.4.3

Operating system:   linux (suse 9.1 professional)

Description:        "alter table rename to" inside a transaction violates
ACID ordering

Details:

to repro, open two psql windows and execute cmds in this order:

in window 1, "create table test (foo integer);"
in window 2, "select count(*) from foo;"
in window 1, "begin transaction;"
in window 2, "select count(*) from foo;"
in window 1, "alter table foo rename to bar;"
in window 2, "select count(*) from foo;"
==> this blocks, like it should
in window 1, "commit;"
==> yikes!  in window 2, it should have errored.
instead it succeeded with 0 records (I'm guessing
because the catalog lookup had already occurred?)

anyway, if you try the same thing, but with "drop
table" instead of rename you do get an error in the
query window.

btw, you guys rock!  8.0 looks awesome.

hope this helps,
adam

(former UC Berkeley grad student in stonebraker's
   database group)

pgsql-bugs by date:

Previous
From: "PostgreSQL Bugs List"
Date:
Subject: BUG #1219: pgxs does not work fully
Next
From: Tom Lane
Date:
Subject: Re: BUG #1220: "alter table rename to" inside a transaction violates ACID ordering