1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-15 14:02:29 +03:00

Rename various "freeze multixact" variables

It seems to make more sense to use "cutoff multixact" terminology
throughout the backend code; "freeze" is associated with replacing of an
Xid with FrozenTransactionId, which is not what we do for MultiXactIds.

Andres Freund
Some adjustments by Álvaro Herrera
This commit is contained in:
Alvaro Herrera
2013-09-16 15:45:00 -03:00
parent 0892ecbc01
commit dd778e9d88
11 changed files with 61 additions and 61 deletions

View File

@@ -69,7 +69,7 @@ static void rebuild_relation(Relation OldHeap, Oid indexOid,
static void copy_heap_data(Oid OIDNewHeap, Oid OIDOldHeap, Oid OIDOldIndex,
int freeze_min_age, int freeze_table_age, bool verbose,
bool *pSwapToastByContent, TransactionId *pFreezeXid,
MultiXactId *pFreezeMulti);
MultiXactId *pCutoffMulti);
static List *get_tables_to_cluster(MemoryContext cluster_context);
static void reform_and_rewrite_tuple(HeapTuple tuple,
TupleDesc oldTupDesc, TupleDesc newTupDesc,
@@ -566,7 +566,7 @@ rebuild_relation(Relation OldHeap, Oid indexOid,
bool is_system_catalog;
bool swap_toast_by_content;
TransactionId frozenXid;
MultiXactId frozenMulti;
MultiXactId cutoffMulti;
/* Mark the correct index as clustered */
if (OidIsValid(indexOid))
@@ -585,7 +585,7 @@ rebuild_relation(Relation OldHeap, Oid indexOid,
/* Copy the heap data into the new table in the desired order */
copy_heap_data(OIDNewHeap, tableOid, indexOid,
freeze_min_age, freeze_table_age, verbose,
&swap_toast_by_content, &frozenXid, &frozenMulti);
&swap_toast_by_content, &frozenXid, &cutoffMulti);
/*
* Swap the physical files of the target and transient tables, then
@@ -593,7 +593,7 @@ rebuild_relation(Relation OldHeap, Oid indexOid,
*/
finish_heap_swap(tableOid, OIDNewHeap, is_system_catalog,
swap_toast_by_content, false, true,
frozenXid, frozenMulti);
frozenXid, cutoffMulti);
}
@@ -736,12 +736,13 @@ make_new_heap(Oid OIDOldHeap, Oid NewTableSpace, bool forcetemp,
* There are two output parameters:
* *pSwapToastByContent is set true if toast tables must be swapped by content.
* *pFreezeXid receives the TransactionId used as freeze cutoff point.
* *pCutoffMulti receives the MultiXactId used as a cutoff point.
*/
static void
copy_heap_data(Oid OIDNewHeap, Oid OIDOldHeap, Oid OIDOldIndex,
int freeze_min_age, int freeze_table_age, bool verbose,
bool *pSwapToastByContent, TransactionId *pFreezeXid,
MultiXactId *pFreezeMulti)
MultiXactId *pCutoffMulti)
{
Relation NewHeap,
OldHeap,
@@ -757,7 +758,7 @@ copy_heap_data(Oid OIDNewHeap, Oid OIDOldHeap, Oid OIDOldIndex,
bool is_system_catalog;
TransactionId OldestXmin;
TransactionId FreezeXid;
MultiXactId MultiXactFrzLimit;
MultiXactId MultiXactCutoff;
RewriteState rwstate;
bool use_sort;
Tuplesortstate *tuplesort;
@@ -858,7 +859,7 @@ copy_heap_data(Oid OIDNewHeap, Oid OIDOldHeap, Oid OIDOldIndex,
*/
vacuum_set_xid_limits(freeze_min_age, freeze_table_age,
OldHeap->rd_rel->relisshared,
&OldestXmin, &FreezeXid, NULL, &MultiXactFrzLimit);
&OldestXmin, &FreezeXid, NULL, &MultiXactCutoff);
/*
* FreezeXid will become the table's new relfrozenxid, and that mustn't go
@@ -869,14 +870,14 @@ copy_heap_data(Oid OIDNewHeap, Oid OIDOldHeap, Oid OIDOldIndex,
/* return selected values to caller */
*pFreezeXid = FreezeXid;
*pFreezeMulti = MultiXactFrzLimit;
*pCutoffMulti = MultiXactCutoff;
/* Remember if it's a system catalog */
is_system_catalog = IsSystemRelation(OldHeap);
/* Initialize the rewrite operation */
rwstate = begin_heap_rewrite(NewHeap, OldestXmin, FreezeXid,
MultiXactFrzLimit, use_wal);
MultiXactCutoff, use_wal);
/*
* Decide whether to use an indexscan or seqscan-and-optional-sort to scan
@@ -1135,7 +1136,7 @@ swap_relation_files(Oid r1, Oid r2, bool target_is_pg_class,
bool swap_toast_by_content,
bool is_internal,
TransactionId frozenXid,
MultiXactId frozenMulti,
MultiXactId cutoffMulti,
Oid *mapped_tables)
{
Relation relRelation;
@@ -1246,8 +1247,8 @@ swap_relation_files(Oid r1, Oid r2, bool target_is_pg_class,
{
Assert(TransactionIdIsNormal(frozenXid));
relform1->relfrozenxid = frozenXid;
Assert(MultiXactIdIsValid(frozenMulti));
relform1->relminmxid = frozenMulti;
Assert(MultiXactIdIsValid(cutoffMulti));
relform1->relminmxid = cutoffMulti;
}
/* swap size statistics too, since new rel has freshly-updated stats */
@@ -1321,7 +1322,7 @@ swap_relation_files(Oid r1, Oid r2, bool target_is_pg_class,
swap_toast_by_content,
is_internal,
frozenXid,
frozenMulti,
cutoffMulti,
mapped_tables);
}
else
@@ -1464,7 +1465,7 @@ finish_heap_swap(Oid OIDOldHeap, Oid OIDNewHeap,
bool check_constraints,
bool is_internal,
TransactionId frozenXid,
MultiXactId frozenMulti)
MultiXactId cutoffMulti)
{
ObjectAddress object;
Oid mapped_tables[4];
@@ -1481,7 +1482,7 @@ finish_heap_swap(Oid OIDOldHeap, Oid OIDNewHeap,
swap_relation_files(OIDOldHeap, OIDNewHeap,
(OIDOldHeap == RelationRelationId),
swap_toast_by_content, is_internal,
frozenXid, frozenMulti, mapped_tables);
frozenXid, cutoffMulti, mapped_tables);
/*
* If it's a system catalog, queue an sinval message to flush all