Re: checking rd_rules in RelationBuildDesc

2022-11-25 Thread Ted Yu
On Fri, Nov 25, 2022 at 8:17 AM Tom Lane wrote: > Ted Yu writes: > > I wonder if we should check relation->rd_rules after the call > > to RelationBuildRuleLock(). > > That patch is both pointless and wrong. There is some > value in updating relhasrules in the catalog, so that future > relcache

Re: checking rd_rules in RelationBuildDesc

2022-11-25 Thread Tom Lane
Ted Yu writes: > I wonder if we should check relation->rd_rules after the call > to RelationBuildRuleLock(). That patch is both pointless and wrong. There is some value in updating relhasrules in the catalog, so that future relcache loads don't uselessly call RelationBuildRuleLock; but we

checking rd_rules in RelationBuildDesc

2022-11-25 Thread Ted Yu
Hi, (In light of commit 7b2ccc5e03bf16d1e1bbabca25298108c839ec52) In RelationBuildDesc(), we have: if (relation->rd_rel->relhasrules) RelationBuildRuleLock(relation); I wonder if we should check relation->rd_rules after the call to RelationBuildRuleLock(). Your comment