@@ -326,8 +326,8 @@ static void mXactCachePut(MultiXactId multi, int nmembers,
326326static char * mxstatus_to_string (MultiXactStatus status );
327327
328328/* management of SLRU infrastructure */
329- static int ZeroMultiXactOffsetPage (int pageno ,bool writeXlog );
330- static int ZeroMultiXactMemberPage (int pageno ,bool writeXlog );
329+ static int ZeroMultiXactOffsetPage (int64 pageno ,bool writeXlog );
330+ static int ZeroMultiXactMemberPage (int64 pageno ,bool writeXlog );
331331static void ExtendMultiXactOffset (MultiXactId multi );
332332static void ExtendMultiXactMember (MultiXactOffset offset ,int nmembers );
333333static bool find_multixact_start (MultiXactId multi ,MultiXactOffset * result );
@@ -1674,25 +1674,45 @@ BootStrapMultiXact(void)
16741674LWLockAcquire (MultiXactOffsetControlLock ,LW_EXCLUSIVE );
16751675
16761676/* Create and zero the first page of the offsets log */
1677- slotno = ZeroMultiXactOffsetPage (multiOffsetPageno , false);
1677+ slotno = ZeroMultiXactOffsetPage (0 , false);
16781678
16791679/* Make sure it's written out */
16801680SimpleLruWritePage (MultiXactOffsetCtl ,slotno );
16811681Assert (!MultiXactOffsetCtl -> shared -> page_dirty [slotno ]);
16821682
1683+ if (multiOffsetPageno != 0 )
1684+ {
1685+ /* Create and zero the first page of the offsets log */
1686+ slotno = ZeroMultiXactOffsetPage (multiOffsetPageno , false);
1687+
1688+ /* Make sure it's written out */
1689+ SimpleLruWritePage (MultiXactOffsetCtl ,slotno );
1690+ Assert (!MultiXactOffsetCtl -> shared -> page_dirty [slotno ]);
1691+ }
1692+
16831693LWLockRelease (MultiXactOffsetControlLock );
16841694
16851695multiMemberPageno = MXOffsetToMemberPage (MultiXactState -> nextOffset );
16861696
16871697LWLockAcquire (MultiXactMemberControlLock ,LW_EXCLUSIVE );
16881698
16891699/* Create and zero the first page of the members log */
1690- slotno = ZeroMultiXactMemberPage (multiMemberPageno , false);
1700+ slotno = ZeroMultiXactMemberPage (0 , false);
16911701
16921702/* Make sure it's written out */
16931703SimpleLruWritePage (MultiXactMemberCtl ,slotno );
16941704Assert (!MultiXactMemberCtl -> shared -> page_dirty [slotno ]);
16951705
1706+ if (multiMemberPageno != 0 )
1707+ {
1708+ /* Create and zero the first page of the members log */
1709+ slotno = ZeroMultiXactMemberPage (multiMemberPageno , false);
1710+
1711+ /* Make sure it's written out */
1712+ SimpleLruWritePage (MultiXactMemberCtl ,slotno );
1713+ Assert (!MultiXactMemberCtl -> shared -> page_dirty [slotno ]);
1714+ }
1715+
16961716LWLockRelease (MultiXactMemberControlLock );
16971717}
16981718
@@ -1706,7 +1726,7 @@ BootStrapMultiXact(void)
17061726 * Control lock must be held at entry, and will be held at exit.
17071727 */
17081728static int
1709- ZeroMultiXactOffsetPage (int pageno ,bool writeXlog )
1729+ ZeroMultiXactOffsetPage (int64 pageno ,bool writeXlog )
17101730{
17111731int slotno ;
17121732
@@ -1722,7 +1742,7 @@ ZeroMultiXactOffsetPage(int pageno, bool writeXlog)
17221742 * Ditto, for MultiXactMember
17231743 */
17241744static int
1725- ZeroMultiXactMemberPage (int pageno ,bool writeXlog )
1745+ ZeroMultiXactMemberPage (int64 pageno ,bool writeXlog )
17261746{
17271747int slotno ;
17281748