Re: Re: Recursive use of syscaches (was: relation ### modified while in use) - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Re: Recursive use of syscaches (was: relation ### modified while in use)
Date
Msg-id 3030.973824186@sss.pgh.pa.us
Whole thread Raw
In response to Re: Re: Recursive use of syscaches (was: relation ### modified while in use)  (Hiroshi Inoue <Inoue@tpf.co.jp>)
List pgsql-hackers
Hiroshi Inoue <Inoue@tpf.co.jp> writes:
> Tom Lane wrote:
>> Why?  We are able to construct all the non-nailed relcache entries
>> from scratch during backend startup.  That seems a sufficient
>> proof that we can reconstruct any or all of them on demand.

> Hmm,why is it sufficent ?
> At backend startup there are no rel cache except
> some nailed rels. When 'reset system cache' message
> arrives,there would be many rel cache entries and
> some of them may be in use.

Doesn't bother me.  The ones that are in use will get rebuilt.
That might trigger recursive rebuilding of system-table relcache
entries, and consequently recursive syscache lookups, but so what?
That already happens during backend startup: some relcache entries
are loaded as a byproduct of attempts to build other ones.

> In addtion there could be some inconsitency of db
> in the middle of the transaction. Is it safe to recon
> struct rel cache under the inconsistency ?

No worse than trying to start up while other transactions are
running.  We don't support on-the-fly modification of schemas
for system catalogs anyway, so I don't see the issue.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Unhappy thoughts about pg_dump and objects inherited from template1
Next
From: Alfred Perlstein
Date:
Subject: Re: 7.0.2 dies when connection dropped mid-transaction