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: Fill EState.es_rteperminfos more systematically.
Date: Mon, 06 Mar 2023 18:11:06 +0000
Message-ID: <E1pZFIg-002DtG-0L@gemulon.postgresql.org> (raw)

Fill EState.es_rteperminfos more systematically.

While testing a fix for bug #17823, I discovered that EvalPlanQualStart
failed to copy es_rteperminfos from the parent EState, resulting in
failure if anything in EPQ execution wanted to consult that information.

This led me to conclude that commit a61b1f748 had been too haphazard
about where to fill es_rteperminfos, and that we need to be sure that
that happens exactly where es_range_table gets filled.  So I changed the
signature of ExecInitRangeTable to help ensure that this new requirement
doesn't get missed.  (Indeed, pgoutput.c was also failing to fill it.
Maybe we don't ever need it there, but I wouldn't bet on that.)

No test case yet; one will arrive with the fix for #17823.
But that needs to be back-patched, while this fix is HEAD-only.

Discussion: https://postgr.es/m/17823-b64909cf7d63de84@postgresql.org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/b803b7d132e3505ab77c29acf91f3d1caa298f95

Modified Files
--------------
src/backend/commands/copyfrom.c             | 8 +-------
src/backend/executor/execMain.c             | 8 ++++----
src/backend/executor/execUtils.c            | 6 +++++-
src/backend/replication/logical/worker.c    | 6 ++++--
src/backend/replication/pgoutput/pgoutput.c | 7 ++++++-
src/include/executor/executor.h             | 2 +-
6 files changed, 21 insertions(+), 16 deletions(-)



Message-ID: <E1pZFIg-002DtG-0L@gemulon.postgresql.org>
Permalink:  ../E1pZFIg-002DtG-0L@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1pZFIg-002DtG-0L@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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Fill EState.es_rteperminfos more systematically.
  In-Reply-To: <E1pZFIg-002DtG-0L@gemulon.postgresql.org>
  References: <E1pZFIg-002DtG-0L@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