@@ -970,7 +970,7 @@ GetNewMultiXactId(int nmembers, MultiXactOffset *offset)
970
970
*/
971
971
if (!MultiXactIdPrecedes (result , MultiXactState -> multiVacLimit ) ||
972
972
(MultiXactState -> nextOffset - MultiXactState -> oldestOffset
973
- > MULTIXACT_MEMBER_SAFE_THRESHOLD ))
973
+ > MULTIXACT_MEMBER_SAFE_THRESHOLD ))
974
974
{
975
975
/*
976
976
* For safety's sake, we release MultiXactGenLock while sending
@@ -1194,14 +1194,14 @@ GetMultiXactIdMembers(MultiXactId multi, MultiXactMember **members,
1194
1194
*
1195
1195
* An ID older than MultiXactState->oldestMultiXactId cannot possibly be
1196
1196
* useful; it has already been removed, or will be removed shortly, by
1197
- * truncation. Returning the wrong values could lead
1198
- * to an incorrect visibility result. However, to support pg_upgrade we
1199
- * need to allow an empty set to be returned regardless, if the caller is
1200
- * willing to accept it; the caller is expected to check that it's an
1201
- * allowed condition (such as ensuring that the infomask bits set on the
1202
- * tuple are consistent with the pg_upgrade scenario). If the caller is
1203
- * expecting this to be called only on recently created multis, then we
1204
- * raise an error.
1197
+ * truncation. Returning the wrong values could lead to an incorrect
1198
+ * visibility result. However, to support pg_upgrade we need to allow an
1199
+ * empty set to be returned regardless, if the caller is willing to accept
1200
+ * it; the caller is expected to check that it's an allowed condition
1201
+ * (such as ensuring that the infomask bits set on the tuple are
1202
+ * consistent with the pg_upgrade scenario). If the caller is expecting
1203
+ * this to be called only on recently created multis, then we raise an
1204
+ * error.
1205
1205
*
1206
1206
* Conversely, an ID >= nextMXact shouldn't ever be seen here; if it is
1207
1207
* seen, it implies undetected ID wraparound has occurred. This raises a
@@ -2142,11 +2142,11 @@ MultiXactSetNextMXact(MultiXactId nextMulti,
2142
2142
* enough to contain the next value that would be created.
2143
2143
*
2144
2144
* We need to do this pretty early during the first startup in binary
2145
- * upgrade mode: before StartupMultiXact() in fact, because this routine is
2146
- * called even before that by StartupXLOG(). And we can't do it earlier
2147
- * than at this point, because during that first call of this routine we
2148
- * determine the MultiXactState->nextMXact value that MaybeExtendOffsetSlru
2149
- * needs.
2145
+ * upgrade mode: before StartupMultiXact() in fact, because this routine
2146
+ * is called even before that by StartupXLOG(). And we can't do it
2147
+ * earlier than at this point, because during that first call of this
2148
+ * routine we determine the MultiXactState->nextMXact value that
2149
+ * MaybeExtendOffsetSlru needs.
2150
2150
*/
2151
2151
if (IsBinaryUpgrade )
2152
2152
MaybeExtendOffsetSlru ();
@@ -2221,11 +2221,11 @@ SetMultiXactIdLimit(MultiXactId oldest_datminmxid, Oid oldest_datoid)
2221
2221
2222
2222
/*
2223
2223
* Determine the offset of the oldest multixact that might still be
2224
- * referenced. Normally, we can read the offset from the multixact itself,
2225
- * but there's an important special case: if there are no multixacts in
2226
- * existence at all, oldest_datminmxid obviously can't point to one. It
2227
- * will instead point to the multixact ID that will be assigned the next
2228
- * time one is needed.
2224
+ * referenced. Normally, we can read the offset from the multixact
2225
+ * itself, but there's an important special case: if there are no
2226
+ * multixacts in existence at all, oldest_datminmxid obviously can't point
2227
+ * to one. It will instead point to the multixact ID that will be
2228
+ * assigned the next time one is needed.
2229
2229
*
2230
2230
* NB: oldest_dataminmxid is the oldest multixact that might still be
2231
2231
* referenced from a table, unlike in DetermineSafeOldestOffset, where we
@@ -2539,10 +2539,9 @@ DetermineSafeOldestOffset(MultiXactId oldestMXact)
2539
2539
* obviously can't point to one. It will instead point to the multixact
2540
2540
* ID that will be assigned the next time one is needed.
2541
2541
*
2542
- * NB: oldestMXact should be the oldest multixact that still exists in
2543
- * the SLRU, unlike in SetMultiXactIdLimit, where we do this same
2544
- * computation based on the oldest value that might be referenced in a
2545
- * table.
2542
+ * NB: oldestMXact should be the oldest multixact that still exists in the
2543
+ * SLRU, unlike in SetMultiXactIdLimit, where we do this same computation
2544
+ * based on the oldest value that might be referenced in a table.
2546
2545
*/
2547
2546
LWLockAcquire (MultiXactGenLock , LW_SHARED );
2548
2547
if (MultiXactState -> nextMXact == oldestMXact )
@@ -2698,9 +2697,9 @@ int
2698
2697
MultiXactMemberFreezeThreshold (void )
2699
2698
{
2700
2699
MultiXactOffset members ;
2701
- uint32 multixacts ;
2702
- uint32 victim_multixacts ;
2703
- double fraction ;
2700
+ uint32 multixacts ;
2701
+ uint32 victim_multixacts ;
2702
+ double fraction ;
2704
2703
2705
2704
ReadMultiXactCounts (& multixacts , & members );
2706
2705
@@ -2819,7 +2818,7 @@ SlruScanDirCbFindEarliest(SlruCtl ctl, char *filename, int segpage, void *data)
2819
2818
void
2820
2819
TruncateMultiXact (void )
2821
2820
{
2822
- MultiXactId oldestMXact ;
2821
+ MultiXactId oldestMXact ;
2823
2822
MultiXactOffset oldestOffset ;
2824
2823
MultiXactOffset nextOffset ;
2825
2824
mxtruncinfo trunc ;
@@ -2879,7 +2878,6 @@ TruncateMultiXact(void)
2879
2878
SimpleLruTruncate (MultiXactOffsetCtl ,
2880
2879
MultiXactIdToOffsetPage (oldestMXact ));
2881
2880
2882
-
2883
2881
/*
2884
2882
* Now, and only now, we can advance the stop point for multixact members.
2885
2883
* If we did it any sooner, the segments we deleted above might already
0 commit comments