--- a/src/backend/utils/sort/tuplesort.c
+++ b/src/backend/utils/sort/tuplesort.c
@@ -4062,6 +4062,7 @@ readtup_heap(Tuplesortstate *state, SortTuple *stup,
 
        /* read in the tuple proper */
        tuple->t_len = tuplen;
+       memset(tuple->mt_padding, 0, MINIMAL_TUPLE_PADDING);
        LogicalTapeReadExact(tape, tupbody, tupbodylen);
        if (state->sortopt & TUPLESORT_RANDOMACCESS)    /* need trailing
