agora inbox for pgsql-committers@postgresql.org
help / color / mirror / Atom feedFrom: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Reject child partition FDWs in FOR PORTION OF
Date: Sat, 27 Jun 2026 17:42:33 +0000
Message-ID: <E1wdX33-000Qx0-15@gemulon.postgresql.org> (raw)
Reject child partition FDWs in FOR PORTION OF
We should defer validating FDW usage until after analysis. We have to
guard against not just the topmost table, but also individual child
partitions. Added the check to CheckValidResultRel, because it is
called after looking up child partitions (accounting for pruning), but
before the FDW can run a DirectModify update, which would bypass
per-tuple executor work.
Author: jian he <jian.universality@gmail.com>
Reported-by: Tom Lane <tgl@sss.pgh.pa.us>
Reviewed-by: Paul A. Jungwirth <pj@illuminatedcomputing.com>
Discussion: https://www.postgresql.org/message-id/flat/CA%2BrenyUte0_UJsJiDJQi82oaBsMJn%3Dcct0Wn%3DvOqXtuDn%3DYY...
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/a40fdf658862b3221a35268f8c74abfd46b9e93c
Modified Files
--------------
contrib/postgres_fdw/expected/postgres_fdw.out | 42 ++++++++++++++++++++++++--
contrib/postgres_fdw/sql/postgres_fdw.sql | 30 ++++++++++++++++--
src/backend/commands/copyfrom.c | 2 +-
src/backend/executor/execMain.c | 11 ++++++-
src/backend/executor/execPartition.c | 4 +--
src/backend/executor/nodeModifyTable.c | 2 +-
src/backend/parser/analyze.c | 6 ----
src/include/executor/executor.h | 2 +-
8 files changed, 81 insertions(+), 18 deletions(-)
Message-ID: <E1wdX33-000Qx0-15@gemulon.postgresql.org>
Permalink: ../E1wdX33-000Qx0-15@gemulon.postgresql.org/
Also on: postgresql.org/message-id/E1wdX33-000Qx0-15@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: peter@eisentraut.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Reject child partition FDWs in FOR PORTION OF
In-Reply-To: <E1wdX33-000Qx0-15@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 agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox