From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Ted Yu <yuzhihong(at)gmail(dot)com> |
Cc: | dean(dot)a(dot)rasheed(at)gmail(dot)com, Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: checking rd_rules in RelationBuildDesc |
Date: | 2022-11-25 16:17:10 |
Message-ID: | 4059872.1669393030@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Ted Yu <yuzhihong(at)gmail(dot)com> 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 certainly can't try to do so right there. That being
the case, making the relcache be out of sync with what's on
disk cannot have any good consequences. The most likely
effect is that it would block later logic from fixing things
correctly. There is logic in VACUUM to clean out obsolete
relhasrules flags (see vac_update_relstats), but I suspect
that would no longer work properly if we did this.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2022-11-25 16:19:09 | Re: Bug in row_number() optimization |
Previous Message | Peter Eisentraut | 2022-11-25 16:13:29 | Re: Non-decimal integer literals |