Re: Useless code in RelationCacheInitializePhase3

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Useless code in RelationCacheInitializePhase3
Date: 2019-04-13 15:09:00
Message-ID: 14687.1555168140@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I wrote:
> Whether it would be nice or not is irrelevant to my point: this code
> doesn't work, and it's unlikely that it would ever be part of a working
> solution. I don't think there's any way that it'd be sane to attempt
> catalog accesses during RelationCacheInitializePhase3.

BTW, to clarify that: obviously, this loop *does* access pg_class, and
pg_class's indexes too. The issue here is that if any of these other
stanzas ever really executed, we would be doing accesses to a bunch of
other catalogs as well, meaning that their relcache entries would have to
already exist in a state valid enough to permit access. That would mean
that they'd have to be treated as bootstrap catalogs so that we could
create hardwired entries with formrdesc. That's not a direction I want
to go in. Bootstrap catalogs are a huge pain to maintain; we don't want
any more than the absolute minimum of them.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2019-04-13 15:32:09 Re: hyrax vs. RelationBuildPartitionDesc
Previous Message Tom Lane 2019-04-13 14:49:27 Re: Useless code in RelationCacheInitializePhase3