Re: RelationFlushRelation() or RelationClearRelation() - Mailing list pgsql-hackers

From Tom Lane
Subject Re: RelationFlushRelation() or RelationClearRelation()
Date
Msg-id 17476.1005076479@sss.pgh.pa.us
Whole thread Raw
In response to RelationFlushRelation() or RelationClearRelation()  (Brent Verner <brent@rcfile.org>)
Responses Re: RelationFlushRelation() or RelationClearRelation()
List pgsql-hackers
Brent Verner <brent@rcfile.org> writes:
>   I've almost got the ALTER TABLE RENAME fixed so it doesn't break
> triggers referring to the renamed column.  The final problem is that
> after the pg_trigger.tgargs is updated, that change is not visible 
> in the current backend.

This should happen automatically as a consequence of the relcache flush
message.  Doing a manual RelationClearRelation or whatever is NOT the
answer; if you find yourself doing that, it means that other backends
aren't hearing about the change either.

The usual way to force a relcache flush is to update the relation's
pg_class row.  Now that I think about it, I'm not sure ALTER TABLE
RENAME COLUMN would have any direct reason to do that, so it may be
broken already in this regard.  Does the relcache entry's column
data get updated with the new name?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Proposal: 7.2b2 today
Next
From: "Rod Taylor"
Date:
Subject: CREATE TEMP SEQUENCE