Re: ResetSystemCaches(was Re: relation ### modified while in use)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: ResetSystemCaches(was Re: relation ### modified while in use)
Date: 2000-11-06 17:08:08
Message-ID: 6602.973530488@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp> writes:
> RelationCacheInvalidate() is called from ResetSystemCaches()
> and calles RelationFlushRelation() for all relation descriptors
> except some nailed system relations.
> I'm wondering why nailed relations could be exceptions.
> Conversely why must RelationCacheInvalidate() call
> RelationFlushRelation() for other system relations ?
> Isn't it sufficient to call smgrclose() and replace rd_rel
> member of system relations by the latest ones instead
> of calling RelationFlushRelation() ?

Possibly you could do fixrdesc() instead of just ignoring the report
entirely for nailed-in relations. Not sure it's worth worrying about
though --- in practice, what is this going to make possible? You can't
change the structure of a nailed-in system catalog, nor will adding
triggers or rules to it work very well, so I'm not quite seeing the
point.

BTW, don't forget that there are nailed-in indexes as well as tables.
Not sure if that matters to this code, but it might.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ross J. Reedstrom 2000-11-06 17:08:09 Re: Alternative database locations are broken
Previous Message Thomas Lockhart 2000-11-06 16:41:03 Committed patches; initdb required