Acquire locks on views in AcquirePlannerLocks, too.
Tom Lane <tgl@sss.pgh.pa.us>
Acquire locks on views in AcquirePlannerLocks, too. Commit 47bb9db75 taught AcquireExecutorLocks to re-acquire locks on views using data from their RTE_SUBQUERY replacements, but it now seems like we should make AcquirePlannerLocks do the same. In this way, if a view has been redefined, we will notice that a bit earlier while checking validity of a cached plan and thereby avoid some wasted work. Report and patch by Amit Langote. Discussion: https://postgr.es/m/CA+HiwqH0xZOQ+GQAdKeckY1R4NOeHdzhtfxkAMJLSchpapNk5w@mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/utils/cache/plancache.c | modified | +8 −0 |
Discussion
- on placeholder entries in view rule action query's range table 24 messages · 2022-12-07 → 2023-04-05