@@ -68,7 +68,7 @@ static void rebuild_relation(Relation OldHeap, Oid indexOid,
68
68
static void copy_heap_data (Oid OIDNewHeap , Oid OIDOldHeap , Oid OIDOldIndex ,
69
69
int freeze_min_age , int freeze_table_age , bool verbose ,
70
70
bool * pSwapToastByContent , TransactionId * pFreezeXid ,
71
- MultiXactId * pFreezeMulti );
71
+ MultiXactId * pCutoffMulti );
72
72
static List * get_tables_to_cluster (MemoryContext cluster_context );
73
73
static void reform_and_rewrite_tuple (HeapTuple tuple ,
74
74
TupleDesc oldTupDesc , TupleDesc newTupDesc ,
@@ -570,7 +570,7 @@ rebuild_relation(Relation OldHeap, Oid indexOid,
570
570
bool is_system_catalog ;
571
571
bool swap_toast_by_content ;
572
572
TransactionId frozenXid ;
573
- MultiXactId frozenMulti ;
573
+ MultiXactId cutoffMulti ;
574
574
575
575
/* Mark the correct index as clustered */
576
576
if (OidIsValid (indexOid ))
@@ -588,15 +588,15 @@ rebuild_relation(Relation OldHeap, Oid indexOid,
588
588
/* Copy the heap data into the new table in the desired order */
589
589
copy_heap_data (OIDNewHeap , tableOid , indexOid ,
590
590
freeze_min_age , freeze_table_age , verbose ,
591
- & swap_toast_by_content , & frozenXid , & frozenMulti );
591
+ & swap_toast_by_content , & frozenXid , & cutoffMulti );
592
592
593
593
/*
594
594
* Swap the physical files of the target and transient tables, then
595
595
* rebuild the target's indexes and throw away the transient table.
596
596
*/
597
597
finish_heap_swap (tableOid , OIDNewHeap , is_system_catalog ,
598
598
swap_toast_by_content , false, true,
599
- frozenXid , frozenMulti );
599
+ frozenXid , cutoffMulti );
600
600
}
601
601
602
602
@@ -725,12 +725,13 @@ make_new_heap(Oid OIDOldHeap, Oid NewTableSpace)
725
725
* There are two output parameters:
726
726
* *pSwapToastByContent is set true if toast tables must be swapped by content.
727
727
* *pFreezeXid receives the TransactionId used as freeze cutoff point.
728
+ * *pCutoffMulti receives the MultiXactId used as a cutoff point.
728
729
*/
729
730
static void
730
731
copy_heap_data (Oid OIDNewHeap , Oid OIDOldHeap , Oid OIDOldIndex ,
731
732
int freeze_min_age , int freeze_table_age , bool verbose ,
732
733
bool * pSwapToastByContent , TransactionId * pFreezeXid ,
733
- MultiXactId * pFreezeMulti )
734
+ MultiXactId * pCutoffMulti )
734
735
{
735
736
Relation NewHeap ,
736
737
OldHeap ,
@@ -746,7 +747,7 @@ copy_heap_data(Oid OIDNewHeap, Oid OIDOldHeap, Oid OIDOldIndex,
746
747
bool is_system_catalog ;
747
748
TransactionId OldestXmin ;
748
749
TransactionId FreezeXid ;
749
- MultiXactId MultiXactFrzLimit ;
750
+ MultiXactId MultiXactCutoff ;
750
751
RewriteState rwstate ;
751
752
bool use_sort ;
752
753
Tuplesortstate * tuplesort ;
@@ -847,7 +848,7 @@ copy_heap_data(Oid OIDNewHeap, Oid OIDOldHeap, Oid OIDOldIndex,
847
848
*/
848
849
vacuum_set_xid_limits (freeze_min_age , freeze_table_age ,
849
850
OldHeap -> rd_rel -> relisshared ,
850
- & OldestXmin , & FreezeXid , NULL , & MultiXactFrzLimit );
851
+ & OldestXmin , & FreezeXid , NULL , & MultiXactCutoff );
851
852
852
853
/*
853
854
* FreezeXid will become the table's new relfrozenxid, and that mustn't go
@@ -858,14 +859,14 @@ copy_heap_data(Oid OIDNewHeap, Oid OIDOldHeap, Oid OIDOldIndex,
858
859
859
860
/* return selected values to caller */
860
861
* pFreezeXid = FreezeXid ;
861
- * pFreezeMulti = MultiXactFrzLimit ;
862
+ * pCutoffMulti = MultiXactCutoff ;
862
863
863
864
/* Remember if it's a system catalog */
864
865
is_system_catalog = IsSystemRelation (OldHeap );
865
866
866
867
/* Initialize the rewrite operation */
867
868
rwstate = begin_heap_rewrite (NewHeap , OldestXmin , FreezeXid ,
868
- MultiXactFrzLimit , use_wal );
869
+ MultiXactCutoff , use_wal );
869
870
870
871
/*
871
872
* Decide whether to use an indexscan or seqscan-and-optional-sort to scan
@@ -1124,7 +1125,7 @@ swap_relation_files(Oid r1, Oid r2, bool target_is_pg_class,
1124
1125
bool swap_toast_by_content ,
1125
1126
bool is_internal ,
1126
1127
TransactionId frozenXid ,
1127
- MultiXactId frozenMulti ,
1128
+ MultiXactId cutoffMulti ,
1128
1129
Oid * mapped_tables )
1129
1130
{
1130
1131
Relation relRelation ;
@@ -1237,8 +1238,8 @@ swap_relation_files(Oid r1, Oid r2, bool target_is_pg_class,
1237
1238
{
1238
1239
Assert (TransactionIdIsNormal (frozenXid ));
1239
1240
relform1 -> relfrozenxid = frozenXid ;
1240
- Assert (MultiXactIdIsValid (frozenMulti ));
1241
- relform1 -> relminmxid = frozenMulti ;
1241
+ Assert (MultiXactIdIsValid (cutoffMulti ));
1242
+ relform1 -> relminmxid = cutoffMulti ;
1242
1243
}
1243
1244
1244
1245
/* swap size statistics too, since new rel has freshly-updated stats */
@@ -1312,7 +1313,7 @@ swap_relation_files(Oid r1, Oid r2, bool target_is_pg_class,
1312
1313
swap_toast_by_content ,
1313
1314
is_internal ,
1314
1315
frozenXid ,
1315
- frozenMulti ,
1316
+ cutoffMulti ,
1316
1317
mapped_tables );
1317
1318
}
1318
1319
else
@@ -1443,7 +1444,7 @@ finish_heap_swap(Oid OIDOldHeap, Oid OIDNewHeap,
1443
1444
bool check_constraints ,
1444
1445
bool is_internal ,
1445
1446
TransactionId frozenXid ,
1446
- MultiXactId frozenMulti )
1447
+ MultiXactId cutoffMulti )
1447
1448
{
1448
1449
ObjectAddress object ;
1449
1450
Oid mapped_tables [4 ];
@@ -1460,7 +1461,7 @@ finish_heap_swap(Oid OIDOldHeap, Oid OIDNewHeap,
1460
1461
swap_relation_files (OIDOldHeap , OIDNewHeap ,
1461
1462
(OIDOldHeap == RelationRelationId ),
1462
1463
swap_toast_by_content , is_internal ,
1463
- frozenXid , frozenMulti , mapped_tables );
1464
+ frozenXid , cutoffMulti , mapped_tables );
1464
1465
1465
1466
/*
1466
1467
* If it's a system catalog, queue an sinval message to flush all
0 commit comments