@@ -3986,13 +3986,17 @@ static void
3986
3986
writetup_cluster (Tuplesortstate * state , int tapenum , SortTuple * stup )
3987
3987
{
3988
3988
HeapTuple tuple = (HeapTuple ) stup -> tuple ;
3989
- unsigned int tuplen = tuple -> t_len + sizeof (ItemPointerData ) + sizeof (int );
3989
+ unsigned int tuplen = tuple -> t_len + sizeof (ItemPointerData ) + 2 * sizeof ( TransactionId ) + sizeof (int );
3990
3990
3991
3991
/* We need to store t_self, but not other fields of HeapTupleData */
3992
3992
LogicalTapeWrite (state -> tapeset , tapenum ,
3993
3993
& tuplen , sizeof (tuplen ));
3994
3994
LogicalTapeWrite (state -> tapeset , tapenum ,
3995
3995
& tuple -> t_self , sizeof (ItemPointerData ));
3996
+ LogicalTapeWrite (state -> tapeset , tapenum ,
3997
+ & tuple -> t_xid_base , sizeof (TransactionId ));
3998
+ LogicalTapeWrite (state -> tapeset , tapenum ,
3999
+ & tuple -> t_multi_base , sizeof (TransactionId ));
3996
4000
LogicalTapeWrite (state -> tapeset , tapenum ,
3997
4001
tuple -> t_data , tuple -> t_len );
3998
4002
if (state -> randomAccess ) /* need trailing length word? */
@@ -4010,7 +4014,7 @@ static void
4010
4014
readtup_cluster (Tuplesortstate * state , SortTuple * stup ,
4011
4015
int tapenum , unsigned int tuplen )
4012
4016
{
4013
- unsigned int t_len = tuplen - sizeof (ItemPointerData ) - sizeof (int );
4017
+ unsigned int t_len = tuplen - sizeof (ItemPointerData ) - 2 * sizeof ( TransactionId ) - sizeof (int );
4014
4018
HeapTuple tuple = (HeapTuple ) readtup_alloc (state ,
4015
4019
t_len + HEAPTUPLESIZE );
4016
4020
@@ -4019,9 +4023,12 @@ readtup_cluster(Tuplesortstate *state, SortTuple *stup,
4019
4023
tuple -> t_len = t_len ;
4020
4024
LogicalTapeReadExact (state -> tapeset , tapenum ,
4021
4025
& tuple -> t_self , sizeof (ItemPointerData ));
4026
+ LogicalTapeReadExact (state -> tapeset , tapenum ,
4027
+ & tuple -> t_xid_base , sizeof (TransactionId ));
4028
+ LogicalTapeReadExact (state -> tapeset , tapenum ,
4029
+ & tuple -> t_multi_base , sizeof (TransactionId ));
4022
4030
/* We don't currently bother to reconstruct t_tableOid */
4023
4031
tuple -> t_tableOid = InvalidOid ;
4024
- HeapTupleSetZeroBase (tuple );
4025
4032
/* Read in the tuple body */
4026
4033
LogicalTapeReadExact (state -> tapeset , tapenum ,
4027
4034
tuple -> t_data , tuple -> t_len );
0 commit comments