aboutsummaryrefslogtreecommitdiff
path: root/src/include/commands
diff options
context:
space:
mode:
authorAmit Kapila <akapila@postgresql.org>2018-07-12 12:51:39 +0530
committerAmit Kapila <akapila@postgresql.org>2018-07-12 12:51:39 +0530
commit40ca70ebcc9d0bc1c02937b27c44b2766617e790 (patch)
tree3fe65a78397130769917447dd610f1859a6c099c /src/include/commands
parentedc6b41bd4a80ea6aebacbd86ebe7c3a01939789 (diff)
downloadpostgresql-40ca70ebcc9d0bc1c02937b27c44b2766617e790.tar.gz
postgresql-40ca70ebcc9d0bc1c02937b27c44b2766617e790.zip
Allow using the updated tuple while moving it to a different partition.
An update that causes the tuple to be moved to a different partition was missing out on re-constructing the to-be-updated tuple, based on the latest tuple in the update chain. Instead, it's simply deleting the latest tuple and inserting a new tuple in the new partition based on the old tuple. Commit 2f17844104 didn't consider this case, so some of the updates were getting lost. In passing, change the argument order for output parameter in ExecDelete and add some commentary about it. Reported-by: Pavan Deolasee Author: Amit Khandekar, with minor changes by me Reviewed-by: Dilip Kumar, Amit Kapila and Alvaro Herrera Backpatch-through: 11 Discussion: https://postgr.es/m/CAJ3gD9fRbEzDqdeDq1jxqZUb47kJn+tQ7=Bcgjc8quqKsDViKQ@mail.gmail.com
Diffstat (limited to 'src/include/commands')
-rw-r--r--src/include/commands/trigger.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/include/commands/trigger.h b/src/include/commands/trigger.h
index a5b8610fa22..1031448c145 100644
--- a/src/include/commands/trigger.h
+++ b/src/include/commands/trigger.h
@@ -206,7 +206,8 @@ extern bool ExecBRDeleteTriggers(EState *estate,
EPQState *epqstate,
ResultRelInfo *relinfo,
ItemPointer tupleid,
- HeapTuple fdw_trigtuple);
+ HeapTuple fdw_trigtuple,
+ TupleTableSlot **epqslot);
extern void ExecARDeleteTriggers(EState *estate,
ResultRelInfo *relinfo,
ItemPointer tupleid,