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

From Tom Lane
Subject Re: BUG #1220: "alter table rename to" inside a transaction violates ACID ordering
Date
Msg-id 4785.1092756695@sss.pgh.pa.us
Whole thread Raw
In response to BUG #1220: "alter table rename to" inside a transaction violates ACID ordering  ("PostgreSQL Bugs List" <pgsql-bugs@postgresql.org>)
List pgsql-bugs
Adam Sah <asah@speakeasy.net> writes:
> well, that's fine I suppose -- but then why does it work the other way
>     for DROP TABLE?

It doesn't work the other way for DROP.  The error you get in the DROP
case is a low-level error that really should never be seen by users.
But I see that as a problem with DROP, not with RENAME.

In my view, once the code has determined which relation (identified by
OID) is meant, it should be OK to take the OID as identifying the
relation henceforth.  This is not significantly different from the fact
that

    create table a (...);
    create view v as select * from a;
    alter table a rename to b;

will leave view v referencing b.  Would you claim that v should break?

            regards, tom lane

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #1220: "alter table rename to" inside a transaction violates ACID ordering
Next
From: Graeme Hinchliffe
Date:
Subject: LOAD not updating object in session