Re: RelationFlushRelation() or RelationClearRelation()

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Brent Verner <brent(at)rcfile(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: RelationFlushRelation() or RelationClearRelation()
Date: 2001-11-06 19:54:39
Message-ID: 17476.1005076479@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Brent Verner <brent(at)rcfile(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Rod Taylor 2001-11-06 20:38:19 CREATE TEMP SEQUENCE
Previous Message Tom Lane 2001-11-06 19:29:22 Re: Proposal: 7.2b2 today