pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Acquire locks on views in AcquirePlannerLocks, too.
Date: Wed, 05 Apr 2023 19:56:41 +0000
Message-ID: <E1pk9FI-001Xdl-FD@gemulon.postgresql.org> (raw)

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(+)



Message-ID: <E1pk9FI-001Xdl-FD@gemulon.postgresql.org>
Permalink:  ../E1pk9FI-001Xdl-FD@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1pk9FI-001Xdl-FD@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Acquire locks on views in AcquirePlannerLocks, too.
  In-Reply-To: <E1pk9FI-001Xdl-FD@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox