1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

Extend amcheck to check heap pages.

Mark Dilger, reviewed by Peter Geoghegan, Andres Freund, Álvaro Herrera,
Michael Paquier, Amul Sul, and by me. Some last-minute cosmetic
revisions by me.

Discussion: http://postgr.es/m/12ED3DA8-25F0-4B68-937D-D907CFBF08E7@enterprisedb.com
This commit is contained in:
Robert Haas
2020-10-22 08:44:18 -04:00
parent f8721bd752
commit 866e24d47d
12 changed files with 2299 additions and 9 deletions

View File

@ -735,6 +735,25 @@ ReadNextMultiXactId(void)
return mxid;
}
/*
* ReadMultiXactIdRange
* Get the range of IDs that may still be referenced by a relation.
*/
void
ReadMultiXactIdRange(MultiXactId *oldest, MultiXactId *next)
{
LWLockAcquire(MultiXactGenLock, LW_SHARED);
*oldest = MultiXactState->oldestMultiXactId;
*next = MultiXactState->nextMXact;
LWLockRelease(MultiXactGenLock);
if (*oldest < FirstMultiXactId)
*oldest = FirstMultiXactId;
if (*next < FirstMultiXactId)
*next = FirstMultiXactId;
}
/*
* MultiXactIdCreateFromMembers
* Make a new MultiXactId from the specified set of members