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