From: Andres Freund Date: Thu, 6 Dec 2018 01:27:40 +0000 (-0800) Subject: slot type fixes X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=7fe8e883eb0ea36ea7b2e2007c8d472d91f45d1c;p=users%2Fandresfreund%2Fpostgres.git slot type fixes Author: Reviewed-By: Discussion: https://postgr.es/m/ Backpatch: --- diff --git a/src/backend/executor/execPartition.c b/src/backend/executor/execPartition.c index 179a501f30..31f7288b46 100644 --- a/src/backend/executor/execPartition.c +++ b/src/backend/executor/execPartition.c @@ -1010,7 +1010,7 @@ ExecInitPartitionDispatchInfo(PartitionTupleRouting *proute, Oid partoid, tupdesc, gettext_noop("could not convert row type")); pd->tupslot = pd->tupmap ? - MakeSingleTupleTableSlot(tupdesc, &TTSOpsHeapTuple) : NULL; + MakeSingleTupleTableSlot(tupdesc, &TTSOpsVirtual) : NULL; } else { diff --git a/src/backend/executor/nodeIndexonlyscan.c b/src/backend/executor/nodeIndexonlyscan.c index d1201a1807..8498273207 100644 --- a/src/backend/executor/nodeIndexonlyscan.c +++ b/src/backend/executor/nodeIndexonlyscan.c @@ -199,7 +199,7 @@ IndexOnlyNext(IndexOnlyScanState *node) */ Assert(slot->tts_tupleDescriptor->natts == scandesc->xs_hitupdesc->natts); - ExecStoreHeapTuple(scandesc->xs_hitup, slot, false); + ExecForceStoreHeapTuple(scandesc->xs_hitup, slot); } else if (scandesc->xs_itup) StoreIndexTuple(slot, scandesc->xs_itup, scandesc->xs_itupdesc); diff --git a/src/backend/executor/nodeIndexscan.c b/src/backend/executor/nodeIndexscan.c index f209173a85..6b222a9f64 100644 --- a/src/backend/executor/nodeIndexscan.c +++ b/src/backend/executor/nodeIndexscan.c @@ -952,6 +952,9 @@ ExecInitIndexScan(IndexScan *node, EState *estate, int eflags) RelationGetDescr(currentRelation), &TTSOpsBufferHeapTuple); + if (node->indexorderby != NIL) + indexstate->ss.ps.scanopsfixed = false; + /* * Initialize result type and projection. */ diff --git a/src/backend/replication/logical/worker.c b/src/backend/replication/logical/worker.c index 8d5e0946c4..893f1f008e 100644 --- a/src/backend/replication/logical/worker.c +++ b/src/backend/replication/logical/worker.c @@ -611,7 +611,7 @@ apply_handle_insert(StringInfo s) estate = create_estate_for_relation(rel); remoteslot = ExecInitExtraTupleSlot(estate, RelationGetDescr(rel->localrel), - &TTSOpsHeapTuple); + &TTSOpsVirtual); /* Input functions may need an active snapshot, so get one */ PushActiveSnapshot(GetTransactionSnapshot());