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: Improve Asserts checking relation matching in parallel scans.
Date: Fri, 20 Sep 2024 20:38:04 +0000
Message-ID: <E1srkOC-000Cr5-98@gemulon.postgresql.org> (raw)

Improve Asserts checking relation matching in parallel scans.

table_beginscan_parallel and index_beginscan_parallel contain
Asserts checking that the relation a worker will use in
a parallel scan is the same one the leader intended.  However,
they were checking for relation OID match, which was not strong
enough to detect the mismatch problem fixed in 126ec0bc7.
What would be strong enough is to compare relfilenodes instead.
Arguably, that's a saner definition anyway, since a scan surely
operates on a physical relation not a logical one.  Hence,
store and compare RelFileLocators not relation OIDs.  Also
ensure that index_beginscan_parallel checks the index identity
not just the table identity.

Discussion: https://postgr.es/m/2127254.1726789524@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/54562c9cfa2281b6303cdea1aff9596c4a5de4b2

Modified Files
--------------
src/backend/access/index/indexam.c | 8 +++++---
src/backend/access/table/tableam.c | 4 ++--
src/include/access/relscan.h       | 7 ++++---
3 files changed, 11 insertions(+), 8 deletions(-)



Message-ID: <E1srkOC-000Cr5-98@gemulon.postgresql.org>
Permalink:  ../E1srkOC-000Cr5-98@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1srkOC-000Cr5-98@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: Improve Asserts checking relation matching in parallel scans.
  In-Reply-To: <E1srkOC-000Cr5-98@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