pgsql: Fill EState.es_rteperminfos more systematically.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fill EState.es_rteperminfos more systematically.
Date: 2023-03-06 18:11:06
Message-ID: E1pZFIg-002DtG-0L@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2023-03-06 22:47:20 pgsql: Silence -Wmissing-braces complaints in file_utils.c
Previous Message Robert Haas 2023-03-06 15:41:47 pgsql: Reword overly-optimistic comment about backup checksum verificat