From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Clean up side-effects of commits ab5fcf2b0 et al. |
Date: | 2019-04-07 16:54:47 |
Message-ID: | E1hDB4B-0008Dc-PL@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Clean up side-effects of commits ab5fcf2b0 et al.
Before those commits, partitioning-related code in the executor could
assume that ModifyTableState.resultRelInfo[] contains only leaf partitions.
However, now a fully-pruned update results in a dummy ModifyTable that
references the root partitioned table, and that breaks some stuff.
In v11, this led to an assertion or core dump in the tuple routing code.
Fix by disabling tuple routing, since we don't need that anyway.
(I chose to do that in HEAD as well for safety, even though the problem
doesn't manifest in HEAD as it stands.)
In v10, this confused ExecInitModifyTable's decision about whether it
needed to close the root table. But we can get rid of that altogether
by being smarter about where to find the root table.
Note that since the referenced commits haven't shipped yet, this
isn't fixing any bug the field has seen.
Amit Langote, per a report from me
Discussion: https://postgr.es/m/20710.1554582479@sss.pgh.pa.us
Branch
------
REL_10_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/67999b3547f7ee8b8c099f41ddab3001e2792202
Modified Files
--------------
src/backend/executor/nodeModifyTable.c | 17 +++--------------
src/test/regress/expected/inherit.out | 9 +++++++++
src/test/regress/sql/inherit.sql | 3 +++
3 files changed, 15 insertions(+), 14 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2019-04-07 19:07:39 | pgsql: psql \dP: list partitioned tables and indexes |
Previous Message | Peter Eisentraut | 2019-04-07 10:39:01 | pgsql: Report progress of REINDEX operations |