pgsql: Acquire locks on views in AcquirePlannerLocks, too.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Acquire locks on views in AcquirePlannerLocks, too.
Date: 2023-04-05 19:56:41
Message-ID: E1pk9FI-001Xdl-FD@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/65eb2d00c6c1bab29db9fa6575185a40d823fe9d

Modified Files
--------------
src/backend/utils/cache/plancache.c | 8 ++++++++
1 file changed, 8 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2023-04-05 20:49:24 pgsql: bufmgr: Acquire and clean victim buffer separately
Previous Message Tomas Vondra 2023-04-05 19:40:41 pgsql: pg_dump: Add support for zstd compression