Skip to content

Commit b37f748

Browse files
committed
pgindent run on access/transam/multixact.c
This file has been patched over and over, and the differences to master caused by pgindent are annoying enough that it seems saner to make the older branches look the same. Backpatch to 9.3, which is as far back as backpatching of bugfixes is necessary.
1 parent 290fb74 commit b37f748

File tree

1 file changed

+26
-28
lines changed

1 file changed

+26
-28
lines changed

src/backend/access/transam/multixact.c

Lines changed: 26 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -970,7 +970,7 @@ GetNewMultiXactId(int nmembers, MultiXactOffset *offset)
970970
*/
971971
if (!MultiXactIdPrecedes(result, MultiXactState->multiVacLimit) ||
972972
(MultiXactState->nextOffset - MultiXactState->oldestOffset
973-
> MULTIXACT_MEMBER_SAFE_THRESHOLD))
973+
> MULTIXACT_MEMBER_SAFE_THRESHOLD))
974974
{
975975
/*
976976
* For safety's sake, we release MultiXactGenLock while sending
@@ -1194,14 +1194,14 @@ GetMultiXactIdMembers(MultiXactId multi, MultiXactMember **members,
11941194
*
11951195
* An ID older than MultiXactState->oldestMultiXactId cannot possibly be
11961196
* 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.
12051205
*
12061206
* Conversely, an ID >= nextMXact shouldn't ever be seen here; if it is
12071207
* seen, it implies undetected ID wraparound has occurred. This raises a
@@ -2142,11 +2142,11 @@ MultiXactSetNextMXact(MultiXactId nextMulti,
21422142
* enough to contain the next value that would be created.
21432143
*
21442144
* 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.
21502150
*/
21512151
if (IsBinaryUpgrade)
21522152
MaybeExtendOffsetSlru();
@@ -2221,11 +2221,11 @@ SetMultiXactIdLimit(MultiXactId oldest_datminmxid, Oid oldest_datoid)
22212221

22222222
/*
22232223
* 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.
22292229
*
22302230
* NB: oldest_dataminmxid is the oldest multixact that might still be
22312231
* referenced from a table, unlike in DetermineSafeOldestOffset, where we
@@ -2539,10 +2539,9 @@ DetermineSafeOldestOffset(MultiXactId oldestMXact)
25392539
* obviously can't point to one. It will instead point to the multixact
25402540
* ID that will be assigned the next time one is needed.
25412541
*
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.
25462545
*/
25472546
LWLockAcquire(MultiXactGenLock, LW_SHARED);
25482547
if (MultiXactState->nextMXact == oldestMXact)
@@ -2698,9 +2697,9 @@ int
26982697
MultiXactMemberFreezeThreshold(void)
26992698
{
27002699
MultiXactOffset members;
2701-
uint32 multixacts;
2702-
uint32 victim_multixacts;
2703-
double fraction;
2700+
uint32 multixacts;
2701+
uint32 victim_multixacts;
2702+
double fraction;
27042703

27052704
ReadMultiXactCounts(&multixacts, &members);
27062705

@@ -2819,7 +2818,7 @@ SlruScanDirCbFindEarliest(SlruCtl ctl, char *filename, int segpage, void *data)
28192818
void
28202819
TruncateMultiXact(void)
28212820
{
2822-
MultiXactId oldestMXact;
2821+
MultiXactId oldestMXact;
28232822
MultiXactOffset oldestOffset;
28242823
MultiXactOffset nextOffset;
28252824
mxtruncinfo trunc;
@@ -2879,7 +2878,6 @@ TruncateMultiXact(void)
28792878
SimpleLruTruncate(MultiXactOffsetCtl,
28802879
MultiXactIdToOffsetPage(oldestMXact));
28812880

2882-
28832881
/*
28842882
* Now, and only now, we can advance the stop point for multixact members.
28852883
* If we did it any sooner, the segments we deleted above might already

0 commit comments

Comments
 (0)