pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #19802: MERGE into a partitioned table fails with "SubPlan found with no parent plan"
8+ messages / 5 participants
[nested] [flat]

Commits from this thread:
  2026-11-11 7a5559a620 84b86f7a51 21234170dc 220b5263db c374dec8f0 291a641ab7  Fix MERGE into partitioned table with subquery in UPDATE targetlist.
* BUG #19802: MERGE into a partitioned table fails with "SubPlan found with no parent plan"
@ 2026-10-28 13:04 PG Bug reporting form <noreply@postgresql.org>
  2026-10-29 00:39 ` Re: BUG #19802: MERGE into a partitioned table fails with "SubPlan found with no parent plan" Tender Wang <tndrwang@gmail.com>
  0 siblings, 1 reply; 8+ messages in thread

From: PG Bug reporting form @ 2026-10-28 13:04 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: gowthamdoma18@gmail.com

The following bug has been logged on the website:

Bug reference:      19802
Logged by:          Gowtham Reddy
Email address:      gowthamdoma18@gmail.com
PostgreSQL version: 18.6
Operating system:   Ubuntu 22.04 (WSL2), x86_64
Description:        

MERGE into a partitioned table fails with an internal error when the source
is a
subquery that is not pulled up, an UPDATE SET clause contains a scalar
subquery
that references the source, and the statement has both WHEN MATCHED UPDATE
and
WHEN NOT MATCHED INSERT:

CREATE TABLE mp (a int, b text) PARTITION BY RANGE (a);
CREATE TABLE mp1 PARTITION OF mp FOR VALUES FROM (0) TO (10);
MERGE INTO mp t
USING (SELECT true AS c OFFSET 0) s ON t.a IS NULL
WHEN MATCHED THEN UPDATE SET b = (SELECT NULL WHERE s.c)
WHEN NOT MATCHED THEN INSERT VALUES (1, 'x');

ERROR:  SubPlan found with no parent plan

Reproduced on 17.11, 18.6 and master (4848fd675, 2026-10-28).

Each of these makes it succeed: a non-partitioned target table; dropping
either
the WHEN MATCHED UPDATE or the WHEN NOT MATCHED INSERT action (or using DO
NOTHING
instead of the INSERT); a join condition that references the source (ON true
also works); a source that is pulled up (no OFFSET/LIMIT); the equivalent
UPDATE ... FROM.

The same message was fixed for a SELECT case on a partitioned table in
eacee6b61
("Don't use SubPlan-containing expressions for startup-time pruning"); that
commit is in the tested master, so this MERGE case seems to take a different
path.

Found by a grammar-based SQL fuzzer (university course project); the script
above is the hand-reduced test case.








^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: BUG #19802: MERGE into a partitioned table fails with "SubPlan found with no parent plan"
  2026-10-28 13:04 BUG #19802: MERGE into a partitioned table fails with "SubPlan found with no parent plan" PG Bug reporting form <noreply@postgresql.org>
@ 2026-10-29 00:39 ` Tender Wang <tndrwang@gmail.com>
  2026-10-29 01:27   ` Re: BUG #19802: MERGE into a partitioned table fails with "SubPlan found with no parent plan" Gowtham Reddy <gowthamdoma18@gmail.com>
  2026-11-04 10:48   ` Re: BUG #19802: MERGE into a partitioned table fails with "SubPlan found with no parent plan" Dilip Kumar <dilipbalaut@gmail.com>
  0 siblings, 2 replies; 8+ messages in thread

From: Tender Wang @ 2026-10-29 00:39 UTC (permalink / raw)
  To: gowthamdoma18@gmail.com; pgsql-bugs@lists.postgresql.org

PG Bug reporting form <noreply@postgresql.org> 于2026年10月29日周四 00:25写道:
> MERGE into a partitioned table fails with an internal error when the source
> is a
> subquery that is not pulled up, an UPDATE SET clause contains a scalar
> subquery
> that references the source, and the statement has both WHEN MATCHED UPDATE
> and
> WHEN NOT MATCHED INSERT:
>
> CREATE TABLE mp (a int, b text) PARTITION BY RANGE (a);
> CREATE TABLE mp1 PARTITION OF mp FOR VALUES FROM (0) TO (10);
> MERGE INTO mp t
> USING (SELECT true AS c OFFSET 0) s ON t.a IS NULL
> WHEN MATCHED THEN UPDATE SET b = (SELECT NULL WHERE s.c)
> WHEN NOT MATCHED THEN INSERT VALUES (1, 'x');
>
> ERROR:  SubPlan found with no parent plan
>
Hi,

Thanks for the report and the nicely reduced test case.

The problem is in ExecInitPartitionInfo().  When tuple routing creates a
ResultRelInfo for a partition during MERGE, it also builds
partition-specific state for the MERGE actions.  For an UPDATE action, it
calls ExecBuildUpdateProjection() with a NULL parent PlanState.

If the UPDATE target list contains a SubPlan, ExecInitSubPlanExpr() needs
the parent PlanState to initialize the SubPlan and add the resulting
SubPlanState to the parent's subPlan list.  Because no parent was supplied,
executor initialization fails with:

    ERROR:  SubPlan found with no parent plan

The corresponding code in ExecInitMerge() passes &mtstate->ps when
building the UPDATE projection.  There is also another call to
ExecBuildUpdateProjection() earlier in ExecInitPartitionInfo(), for
ON CONFLICT DO UPDATE, that already passes &mtstate->ps.  Only the
partition-specific MERGE UPDATE path passes NULL.

Passing the same parent in that path fixes the problem:

    -                                 NULL);
    +                                 &mtstate->ps);

Attached is a patch with the fix.  I have run the regression tests successfully.


-- 
Thanks,
Tender Wang

Attachments:

0001-Fix-MERGE-into-partitioned-tables-with-SubPlans-in-U.patch (text/plain, 1.5K) download From 26bf0d5a1aa1017139f04386278f40d7a98cc145 Mon Sep 17 00:00:00 2001 From: Tender Wang <tndrwang@gmail.com> Date: Thu, 29 Oct 2026 08:31:04 +0800 Subject: [PATCH] Fix MERGE into partitioned tables with SubPlans in UPDATE actions When tuple routing creates a ResultRelInfo for a partition during MERGE, ExecInitPartitionInfo() builds partition-specific state for each MERGE action. Unlike the corresponding code in ExecInitMerge(), it passed a NULL parent PlanState when building an UPDATE projection. This fails if the UPDATE target list contains a SubPlan, because ExecInitSubPlanExpr() needs the parent PlanState to initialize the SubPlan and attach its state to the parent's subPlan list, resulting in the error "SubPlan found with no parent plan". Pass the ModifyTableState's PlanState to ExecBuildUpdateProjection(), as ExecInitMerge() already does. --- src/backend/executor/execPartition.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/executor/execPartition.c b/src/backend/executor/execPartition.c index 4ec69f2bf99..a7ec585763e 100644 --- a/src/backend/executor/execPartition.c +++ b/src/backend/executor/execPartition.c @@ -1069,7 +1069,7 @@ ExecInitPartitionInfo(ModifyTableState *mtstate, EState *estate, RelationGetDescr(leaf_part_rri->ri_RelationDesc), econtext, leaf_part_rri->ri_newTupleSlot, - NULL); + &mtstate->ps); break; case CMD_DELETE: case CMD_NOTHING: -- 2.43.0
^ permalink raw reply [nested|flat] 8+ messages in thread

* Re: BUG #19802: MERGE into a partitioned table fails with "SubPlan found with no parent plan"
  2026-10-28 13:04 BUG #19802: MERGE into a partitioned table fails with "SubPlan found with no parent plan" PG Bug reporting form <noreply@postgresql.org>
  2026-10-29 00:39 ` Re: BUG #19802: MERGE into a partitioned table fails with "SubPlan found with no parent plan" Tender Wang <tndrwang@gmail.com>
@ 2026-10-29 01:27   ` Gowtham Reddy <gowthamdoma18@gmail.com>
  2026-11-03 13:00     ` Re: BUG #19802: MERGE into a partitioned table fails with "SubPlan found with no parent plan" Tender Wang <tndrwang@gmail.com>
  1 sibling, 1 reply; 8+ messages in thread

From: Gowtham Reddy @ 2026-10-29 01:27 UTC (permalink / raw)
  To: Tender Wang <tndrwang@gmail.com>; +Cc: pgsql-bugs@lists.postgresql.org

Hi,

Thanks for the quick analysis and the patch.

I applied the one-line change you described (passing &mtstate->ps to
ExecBuildUpdateProjection() for the partition MERGE UPDATE action) on
master at 4848fd675. The reproducer from my report now succeeds, and a
MERGE that takes the UPDATE path with the subquery in SET updates the
row correctly.

Regards,
Gowtham

On Thu, 29 Oct 2026 at 06:09, Tender Wang <tndrwang@gmail.com> wrote:
>
> PG Bug reporting form <noreply@postgresql.org> 于2026年10月29日周四 00:25写道:
> > MERGE into a partitioned table fails with an internal error when the source
> > is a
> > subquery that is not pulled up, an UPDATE SET clause contains a scalar
> > subquery
> > that references the source, and the statement has both WHEN MATCHED UPDATE
> > and
> > WHEN NOT MATCHED INSERT:
> >
> > CREATE TABLE mp (a int, b text) PARTITION BY RANGE (a);
> > CREATE TABLE mp1 PARTITION OF mp FOR VALUES FROM (0) TO (10);
> > MERGE INTO mp t
> > USING (SELECT true AS c OFFSET 0) s ON t.a IS NULL
> > WHEN MATCHED THEN UPDATE SET b = (SELECT NULL WHERE s.c)
> > WHEN NOT MATCHED THEN INSERT VALUES (1, 'x');
> >
> > ERROR:  SubPlan found with no parent plan
> >
> Hi,
>
> Thanks for the report and the nicely reduced test case.
>
> The problem is in ExecInitPartitionInfo().  When tuple routing creates a
> ResultRelInfo for a partition during MERGE, it also builds
> partition-specific state for the MERGE actions.  For an UPDATE action, it
> calls ExecBuildUpdateProjection() with a NULL parent PlanState.
>
> If the UPDATE target list contains a SubPlan, ExecInitSubPlanExpr() needs
> the parent PlanState to initialize the SubPlan and add the resulting
> SubPlanState to the parent's subPlan list.  Because no parent was supplied,
> executor initialization fails with:
>
>     ERROR:  SubPlan found with no parent plan
>
> The corresponding code in ExecInitMerge() passes &mtstate->ps when
> building the UPDATE projection.  There is also another call to
> ExecBuildUpdateProjection() earlier in ExecInitPartitionInfo(), for
> ON CONFLICT DO UPDATE, that already passes &mtstate->ps.  Only the
> partition-specific MERGE UPDATE path passes NULL.
>
> Passing the same parent in that path fixes the problem:
>
>     -                                 NULL);
>     +                                 &mtstate->ps);
>
> Attached is a patch with the fix.  I have run the regression tests successfully.
>
>
> --
> Thanks,
> Tender Wang






^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: BUG #19802: MERGE into a partitioned table fails with "SubPlan found with no parent plan"
  2026-10-28 13:04 BUG #19802: MERGE into a partitioned table fails with "SubPlan found with no parent plan" PG Bug reporting form <noreply@postgresql.org>
  2026-10-29 00:39 ` Re: BUG #19802: MERGE into a partitioned table fails with "SubPlan found with no parent plan" Tender Wang <tndrwang@gmail.com>
  2026-10-29 01:27   ` Re: BUG #19802: MERGE into a partitioned table fails with "SubPlan found with no parent plan" Gowtham Reddy <gowthamdoma18@gmail.com>
@ 2026-11-03 13:00     ` Tender Wang <tndrwang@gmail.com>
  0 siblings, 0 replies; 8+ messages in thread

From: Tender Wang @ 2026-11-03 13:00 UTC (permalink / raw)
  To: pgsql-bugs <pgsql-bugs@lists.postgresql.org>; +Cc: Gowtham Reddy <gowthamdoma18@gmail.com>; Dean Rasheed <dean.a.rasheed@gmail.com>

Gowtham Reddy <gowthamdoma18@gmail.com> 于2026年10月29日周四 09:27写道:
>
> Hi,
>
> Thanks for the quick analysis and the patch.
>
> I applied the one-line change you described (passing &mtstate->ps to
> ExecBuildUpdateProjection() for the partition MERGE UPDATE action) on
> master at 4848fd675. The reproducer from my report now succeeds, and a
> MERGE that takes the UPDATE path with the subquery in SET updates the
> row correctly.

Thanks for testing the patch and confirming that it fixes the problem.

I am CC'ing Dean, who has worked on related MERGE executor code, in case
he has any comments on the proposed fix.

-- 
Thanks,
Tender Wang






^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: BUG #19802: MERGE into a partitioned table fails with "SubPlan found with no parent plan"
  2026-10-28 13:04 BUG #19802: MERGE into a partitioned table fails with "SubPlan found with no parent plan" PG Bug reporting form <noreply@postgresql.org>
  2026-10-29 00:39 ` Re: BUG #19802: MERGE into a partitioned table fails with "SubPlan found with no parent plan" Tender Wang <tndrwang@gmail.com>
@ 2026-11-04 10:48   ` Dilip Kumar <dilipbalaut@gmail.com>
  2026-11-04 11:25     ` Re: BUG #19802: MERGE into a partitioned table fails with "SubPlan found with no parent plan" Tender Wang <tndrwang@gmail.com>
  1 sibling, 1 reply; 8+ messages in thread

From: Dilip Kumar @ 2026-11-04 10:48 UTC (permalink / raw)
  To: Tender Wang <tndrwang@gmail.com>; +Cc: gowthamdoma18@gmail.com; pgsql-bugs@lists.postgresql.org

On Thu, Oct 29, 2026 at 6:09 AM Tender Wang <tndrwang@gmail.com> wrote:
>
> PG Bug reporting form <noreply@postgresql.org> 于2026年10月29日周四 00:25写道:
> > MERGE into a partitioned table fails with an internal error when the source
> > is a
> > subquery that is not pulled up, an UPDATE SET clause contains a scalar
> > subquery
> > that references the source, and the statement has both WHEN MATCHED UPDATE
> > and
> > WHEN NOT MATCHED INSERT:
> >
> > CREATE TABLE mp (a int, b text) PARTITION BY RANGE (a);
> > CREATE TABLE mp1 PARTITION OF mp FOR VALUES FROM (0) TO (10);
> > MERGE INTO mp t
> > USING (SELECT true AS c OFFSET 0) s ON t.a IS NULL
> > WHEN MATCHED THEN UPDATE SET b = (SELECT NULL WHERE s.c)
> > WHEN NOT MATCHED THEN INSERT VALUES (1, 'x');
> >
> > ERROR:  SubPlan found with no parent plan
> >
> Hi,
>
> Thanks for the report and the nicely reduced test case.
>
> The problem is in ExecInitPartitionInfo().  When tuple routing creates a
> ResultRelInfo for a partition during MERGE, it also builds
> partition-specific state for the MERGE actions.  For an UPDATE action, it
> calls ExecBuildUpdateProjection() with a NULL parent PlanState.
>
> If the UPDATE target list contains a SubPlan, ExecInitSubPlanExpr() needs
> the parent PlanState to initialize the SubPlan and add the resulting
> SubPlanState to the parent's subPlan list.  Because no parent was supplied,
> executor initialization fails with:
>
>     ERROR:  SubPlan found with no parent plan
>
> The corresponding code in ExecInitMerge() passes &mtstate->ps when
> building the UPDATE projection.  There is also another call to
> ExecBuildUpdateProjection() earlier in ExecInitPartitionInfo(), for
> ON CONFLICT DO UPDATE, that already passes &mtstate->ps.  Only the
> partition-specific MERGE UPDATE path passes NULL.

Yeah, that seems to be wrong

>
> Passing the same parent in that path fixes the problem:
>
>     -                                 NULL);
>     +                                 &mtstate->ps);

> Attached is a patch with the fix.  I have run the regression tests successfully.

I think your analysis and fix LGTM. Can you also add a test case so
that we do not break this in the future?  Thanks.


-- 
Regards,
Dilip Kumar
Google






^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: BUG #19802: MERGE into a partitioned table fails with "SubPlan found with no parent plan"
  2026-10-28 13:04 BUG #19802: MERGE into a partitioned table fails with "SubPlan found with no parent plan" PG Bug reporting form <noreply@postgresql.org>
  2026-10-29 00:39 ` Re: BUG #19802: MERGE into a partitioned table fails with "SubPlan found with no parent plan" Tender Wang <tndrwang@gmail.com>
  2026-11-04 10:48   ` Re: BUG #19802: MERGE into a partitioned table fails with "SubPlan found with no parent plan" Dilip Kumar <dilipbalaut@gmail.com>
@ 2026-11-04 11:25     ` Tender Wang <tndrwang@gmail.com>
  2026-11-04 12:28       ` Re: BUG #19802: MERGE into a partitioned table fails with "SubPlan found with no parent plan" Dilip Kumar <dilipbalaut@gmail.com>
  0 siblings, 1 reply; 8+ messages in thread

From: Tender Wang @ 2026-11-04 11:25 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: gowthamdoma18@gmail.com, Dilip Kumar <dilipbalaut@gmail.com>; Dean Rasheed <dean.a.rasheed@gmail.com>

Hi,

Dilip Kumar <dilipbalaut@gmail.com> 于2026年11月4日周三 18:49写道:
>
> I think your analysis and fix LGTM. Can you also add a test case so
> that we do not break this in the future?  Thanks.
>

Thanks for the review.
I added the regression test in the attached v2 patch.

-- 
Thanks,
Tender Wang

Attachments:

v2-0001-Fix-MERGE-into-partitioned-tables-with-SubPlans-i.patch (text/plain, 3.1K) download From a4a92127622e3ecdac4f195e91cee839a78220e4 Mon Sep 17 00:00:00 2001 From: Tender Wang <tndrwang@gmail.com> Date: Thu, 29 Oct 2026 08:31:04 +0800 Subject: [PATCH v2] Fix MERGE into partitioned tables with SubPlans in UPDATE actions When tuple routing creates a ResultRelInfo for a partition during MERGE, ExecInitPartitionInfo() builds partition-specific state for each MERGE action. Unlike the corresponding code in ExecInitMerge(), it passed a NULL parent PlanState when building an UPDATE projection. This fails if the UPDATE target list contains a SubPlan, because ExecInitSubPlanExpr() needs the parent PlanState to initialize the SubPlan and attach its state to the parent's subPlan list, resulting in the error "SubPlan found with no parent plan". Pass the ModifyTableState's PlanState to ExecBuildUpdateProjection(), as ExecInitMerge() already does. --- src/backend/executor/execPartition.c | 2 +- src/test/regress/expected/merge.out | 15 +++++++++++++++ src/test/regress/sql/merge.sql | 11 +++++++++++ 3 files changed, 27 insertions(+), 1 deletion(-) diff --git a/src/backend/executor/execPartition.c b/src/backend/executor/execPartition.c index 4ec69f2bf99..a7ec585763e 100644 --- a/src/backend/executor/execPartition.c +++ b/src/backend/executor/execPartition.c @@ -1069,7 +1069,7 @@ ExecInitPartitionInfo(ModifyTableState *mtstate, EState *estate, RelationGetDescr(leaf_part_rri->ri_RelationDesc), econtext, leaf_part_rri->ri_newTupleSlot, - NULL); + &mtstate->ps); break; case CMD_DELETE: case CMD_NOTHING: diff --git a/src/test/regress/expected/merge.out b/src/test/regress/expected/merge.out index 9cb1d87066a..17586383153 100644 --- a/src/test/regress/expected/merge.out +++ b/src/test/regress/expected/merge.out @@ -2307,6 +2307,21 @@ MERGE INTO pa_target t WHEN MATCHED THEN UPDATE SET tid = tid - 1; ERROR: new row violates row-level security policy for table "pa_target" +ROLLBACK; +-- Test a SubPlan in a partition-specific MERGE UPDATE projection +BEGIN; +MERGE INTO pa_target t +USING (SELECT true AS c OFFSET 0) s ON t.tid IS NULL +WHEN MATCHED THEN + UPDATE SET val = (SELECT NULL WHERE s.c) +WHEN NOT MATCHED THEN + INSERT VALUES (1, 0, 'subplan test'); +SELECT * FROM pa_target WHERE val = 'subplan test'; + tid | balance | val +-----+---------+-------------- + 1 | 0 | subplan test +(1 row) + ROLLBACK; DROP TABLE pa_source; DROP TABLE pa_target CASCADE; diff --git a/src/test/regress/sql/merge.sql b/src/test/regress/sql/merge.sql index 2660b19f238..ddc2ac68495 100644 --- a/src/test/regress/sql/merge.sql +++ b/src/test/regress/sql/merge.sql @@ -1432,6 +1432,17 @@ MERGE INTO pa_target t UPDATE SET tid = tid - 1; ROLLBACK; +-- Test a SubPlan in a partition-specific MERGE UPDATE projection +BEGIN; +MERGE INTO pa_target t +USING (SELECT true AS c OFFSET 0) s ON t.tid IS NULL +WHEN MATCHED THEN + UPDATE SET val = (SELECT NULL WHERE s.c) +WHEN NOT MATCHED THEN + INSERT VALUES (1, 0, 'subplan test'); +SELECT * FROM pa_target WHERE val = 'subplan test'; +ROLLBACK; + DROP TABLE pa_source; DROP TABLE pa_target CASCADE; -- 2.43.0
^ permalink raw reply [nested|flat] 8+ messages in thread

* Re: BUG #19802: MERGE into a partitioned table fails with "SubPlan found with no parent plan"
  2026-10-28 13:04 BUG #19802: MERGE into a partitioned table fails with "SubPlan found with no parent plan" PG Bug reporting form <noreply@postgresql.org>
  2026-10-29 00:39 ` Re: BUG #19802: MERGE into a partitioned table fails with "SubPlan found with no parent plan" Tender Wang <tndrwang@gmail.com>
  2026-11-04 10:48   ` Re: BUG #19802: MERGE into a partitioned table fails with "SubPlan found with no parent plan" Dilip Kumar <dilipbalaut@gmail.com>
  2026-11-04 11:25     ` Re: BUG #19802: MERGE into a partitioned table fails with "SubPlan found with no parent plan" Tender Wang <tndrwang@gmail.com>
@ 2026-11-04 12:28       ` Dilip Kumar <dilipbalaut@gmail.com>
  2026-11-11 12:33         ` Re: BUG #19802: MERGE into a partitioned table fails with "SubPlan found with no parent plan" Dean Rasheed <dean.a.rasheed@gmail.com>
  0 siblings, 1 reply; 8+ messages in thread

From: Dilip Kumar @ 2026-11-04 12:28 UTC (permalink / raw)
  To: Tender Wang <tndrwang@gmail.com>; +Cc: pgsql-bugs@lists.postgresql.org, gowthamdoma18@gmail.com, Dean Rasheed <dean.a.rasheed@gmail.com>

On Wed, Nov 4, 2026 at 4:55 PM Tender Wang <tndrwang@gmail.com> wrote:
>
> Hi,
>
> Dilip Kumar <dilipbalaut@gmail.com> 于2026年11月4日周三 18:49写道:
> >
> > I think your analysis and fix LGTM. Can you also add a test case so
> > that we do not break this in the future?  Thanks.
> >
>
> Thanks for the review.
> I added the regression test in the attached v2 patch.
>

Thanks this LGTM.


-- 
Regards,
Dilip Kumar
Google






^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: BUG #19802: MERGE into a partitioned table fails with "SubPlan found with no parent plan"
  2026-10-28 13:04 BUG #19802: MERGE into a partitioned table fails with "SubPlan found with no parent plan" PG Bug reporting form <noreply@postgresql.org>
  2026-10-29 00:39 ` Re: BUG #19802: MERGE into a partitioned table fails with "SubPlan found with no parent plan" Tender Wang <tndrwang@gmail.com>
  2026-11-04 10:48   ` Re: BUG #19802: MERGE into a partitioned table fails with "SubPlan found with no parent plan" Dilip Kumar <dilipbalaut@gmail.com>
  2026-11-04 11:25     ` Re: BUG #19802: MERGE into a partitioned table fails with "SubPlan found with no parent plan" Tender Wang <tndrwang@gmail.com>
  2026-11-04 12:28       ` Re: BUG #19802: MERGE into a partitioned table fails with "SubPlan found with no parent plan" Dilip Kumar <dilipbalaut@gmail.com>
@ 2026-11-11 12:33         ` Dean Rasheed <dean.a.rasheed@gmail.com>
  0 siblings, 0 replies; 8+ messages in thread

From: Dean Rasheed @ 2026-11-11 12:33 UTC (permalink / raw)
  To: Dilip Kumar <dilipbalaut@gmail.com>; +Cc: Tender Wang <tndrwang@gmail.com>; pgsql-bugs@lists.postgresql.org; gowthamdoma18@gmail.com

On Wed, 4 Nov 2026 at 12:28, Dilip Kumar <dilipbalaut@gmail.com> wrote:
>
> On Wed, Nov 4, 2026 at 4:55 PM Tender Wang <tndrwang@gmail.com> wrote:
> >
> > Thanks for the review.
> > I added the regression test in the attached v2 patch.
>
> Thanks this LGTM.

Thanks everyone.

Pushed, and back-patched to v15.

Regards,
Dean






^ permalink  raw  reply  [nested|flat] 8+ messages in thread


end of thread, other threads:[~2026-11-11 12:33 UTC | newest]

Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-10-28 13:04 BUG #19802: MERGE into a partitioned table fails with "SubPlan found with no parent plan" PG Bug reporting form <noreply@postgresql.org>
2026-10-29 00:39 ` Tender Wang <tndrwang@gmail.com>
2026-10-29 01:27   ` Gowtham Reddy <gowthamdoma18@gmail.com>
2026-11-03 13:00     ` Tender Wang <tndrwang@gmail.com>
2026-11-04 10:48   ` Dilip Kumar <dilipbalaut@gmail.com>
2026-11-04 11:25     ` Tender Wang <tndrwang@gmail.com>
2026-11-04 12:28       ` Dilip Kumar <dilipbalaut@gmail.com>
2026-11-11 12:33         ` Dean Rasheed <dean.a.rasheed@gmail.com>

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