From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Fix partition tuple routing with dropped attributes |
Date: | 2019-04-08 04:46:15 |
Message-ID: | E1hDMAh-0005YN-N9@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Fix partition tuple routing with dropped attributes
When trying to insert a tuple into a partitioned table, the routing to
the correct partition has been messed up by mixing when a tuple needs to
be stored in an intermediate parent's slot and when a tuple needs to be
converted because of attribute changes between the immediate parent
relation and the parent relation one level above that (the grandparent).
This could trigger errors like the following:
ERROR: cannot extract attribute from empty tuple slot SQL state: XX000
This was not detected because regression tests with dropped attributes
only included tests with two levels of partitioning, and this can be
triggered with three levels or more.
This fixes bug #15733, which has been introduced by 34295b8. The bug
happens only on REL_11_STABLE and HEAD gains the regression tests added
for this bug.
Reported-by: Petr Fedorov
Author: Amit Langote, Michael Paquier
Discussion: https://postgr.es/m/15733-7692379e310b80ec@postgresql.org
Branch
------
REL_11_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/6b0208ebc436b33bd80ce264299b4b1b8d59b68a
Modified Files
--------------
src/backend/executor/execPartition.c | 39 +++++++++++++++++++++-------------
src/test/regress/expected/insert.out | 41 ++++++++++++++++++++++++++++++++++++
src/test/regress/sql/insert.sql | 28 ++++++++++++++++++++++++
3 files changed, 93 insertions(+), 15 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2019-04-08 05:16:32 | pgsql: Fix a number of issues around modifying a previously updated row |
Previous Message | Tom Lane | 2019-04-07 22:19:34 | pgsql: Avoid fetching past the end of the indoption array. |