Re: Useless code in RelationCacheInitializePhase3

2019-09-10 Thread Alvaro Herrera from 2ndQuadrant
Hello, On 2019-Apr-13, Tom Lane wrote: > Andres Freund writes: > > I think it probably would work for catalog tables, as it's coded right > > now. There's no catalog lookups RelationInitTableAccessMethod() for > > tables that return true for IsCatalogTable(). In fact, I think we should > > appl

Re: Useless code in RelationCacheInitializePhase3

2019-04-13 Thread Tom Lane
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

Re: Useless code in RelationCacheInitializePhase3

2019-04-13 Thread Tom Lane
Andres Freund writes: > On 2019-04-12 14:17:11 -0400, Tom Lane wrote: >> While looking at the pending patch to clean up management of >> rd_partcheck, I noticed that RelationCacheInitializePhase3 has code that >> purports to reload rd_partkey and rd_partdesc, but none for rd_partcheck. >> However,

Re: Useless code in RelationCacheInitializePhase3

2019-04-12 Thread Andres Freund
Hi, On 2019-04-12 14:17:11 -0400, Tom Lane wrote: > While looking at the pending patch to clean up management of > rd_partcheck, I noticed that RelationCacheInitializePhase3 has code that > purports to reload rd_partkey and rd_partdesc, but none for rd_partcheck. > However, that reload code is dea

Useless code in RelationCacheInitializePhase3

2019-04-12 Thread Tom Lane
While looking at the pending patch to clean up management of rd_partcheck, I noticed that RelationCacheInitializePhase3 has code that purports to reload rd_partkey and rd_partdesc, but none for rd_partcheck. However, that reload code is dead code, as is easily confirmed by checking the code coverag