Skip to content

Commit 80d1765

Browse files
author
Alexander Korotkov
committed
Make it possible to initialize multixact with non-zero offset.
1 parent cbf17be commit 80d1765

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/backend/access/transam/multixact.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1714,6 +1714,20 @@ BootStrapMultiXact(void)
17141714
}
17151715

17161716
LWLockRelease(MultiXactMemberControlLock);
1717+
1718+
/*
1719+
* If we're starting not from zero offset, initilize dummy multixact to
1720+
* evade too long loop in PerformMembersTruncation().
1721+
*/
1722+
if (MultiXactState->nextOffset > 0 && MultiXactState->nextMXact > 0)
1723+
{
1724+
RecordNewMultiXact(FirstMultiXactId,
1725+
MultiXactState->nextOffset,
1726+
0, NULL);
1727+
RecordNewMultiXact(MultiXactState->nextMXact - 1,
1728+
MultiXactState->nextOffset,
1729+
0, NULL);
1730+
}
17171731
}
17181732

17191733
/*

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy