Re: BUG #1220: "alter table rename to" inside a transaction violates ACID ordering

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Adam Sah <asah(at)speakeasy(dot)net>
Cc: adam sah <asah(at)midgard(dot)net>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #1220: "alter table rename to" inside a transaction violates ACID ordering
Date: 2004-08-17 15:31:35
Message-ID: 4785.1092756695@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Adam Sah <asah(at)speakeasy(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Graeme Hinchliffe 2004-08-17 15:48:59 LOAD not updating object in session
Previous Message Bruce Momjian 2004-08-17 15:22:01 Re: [BUGS] 8.0.0beta1: -lpthread missing