slot type fixes
authorAndres Freund <[email protected]>
Thu, 6 Dec 2018 01:27:40 +0000 (17:27 -0800)
committerAndres Freund <[email protected]>
Tue, 11 Dec 2018 00:48:56 +0000 (16:48 -0800)
Author:
Reviewed-By:
Discussion: https://postgr.es/m/
Backpatch:

src/backend/executor/execPartition.c
src/backend/executor/nodeIndexonlyscan.c
src/backend/executor/nodeIndexscan.c
src/backend/replication/logical/worker.c

index 179a501f3068b45df8533b26563b0cf8289a9e44..31f7288b46071fdeb8424d46472f65ec19d4ddd2 100644 (file)
@@ -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
    {
index d1201a18078619b13da414d3ec7d2dcd5deabf58..8498273207b4334b3dac10fbe15f51ab7807b2c4 100644 (file)
@@ -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);
index f209173a8532484a289d6083061be75f11d411ad..6b222a9f64cb863c13b12590d9ebeb1093243d98 100644 (file)
@@ -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.
     */
index 8d5e0946c4be6aac710e71619301ef55be3e720a..893f1f008edf248362af7e2c1cd4bc0dcb86c7b9 100644 (file)
@@ -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());