Looks like we need similar adjustment in ExecSimpleRelationUpdate() as well. Updated the patch.
On Tue, Jun 26, 2018 at 3:12 PM, Ashutosh Bapat <ashutosh.ba...@enterprisedb.com> wrote: > Hi, > There seems to be a thinko/typo in ExecSimpleRelationInsert(). A tuple > can never store a slot, but a comment in that function says so. Tried > to fix it in the patch attached. > > -- > Best Wishes, > Ashutosh Bapat > EnterpriseDB Corporation > The Postgres Database Company -- Best Wishes, Ashutosh Bapat EnterpriseDB Corporation The Postgres Database Company
From 387148433d33eb7a9c2960e9ba554b1e28d04ef1 Mon Sep 17 00:00:00 2001 From: Ashutosh Bapat <ashutosh.ba...@enterprisedb.com> Date: Tue, 26 Jun 2018 15:02:07 +0530 Subject: [PATCH 2/2] Fix a thinko/typo in ExecSimpleRelationInsert/Update A slot can not be stored in a tuple but it's vice versa. --- src/backend/executor/execReplication.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/executor/execReplication.c b/src/backend/executor/execReplication.c index 4fbdfc0..ee6ad37 100644 --- a/src/backend/executor/execReplication.c +++ b/src/backend/executor/execReplication.c @@ -415,7 +415,7 @@ ExecSimpleRelationInsert(EState *estate, TupleTableSlot *slot) if (rel->rd_att->constr) ExecConstraints(resultRelInfo, slot, estate, true); - /* Store the slot into tuple that we can inspect. */ + /* Materialize slot into a tuple that we can inspect. */ tuple = ExecMaterializeSlot(slot); /* OK, store the tuple and create index entries for it */ @@ -480,7 +480,7 @@ ExecSimpleRelationUpdate(EState *estate, EPQState *epqstate, if (rel->rd_att->constr) ExecConstraints(resultRelInfo, slot, estate, true); - /* Store the slot into tuple that we can write. */ + /* Materialize slot into a tuple that we can inspect. */ tuple = ExecMaterializeSlot(slot); /* OK, update the tuple and index entries for it */ -- 2.7.4