diff options
author | Robert Haas <rhaas@postgresql.org> | 2020-10-22 08:44:18 -0400 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2020-10-22 08:44:18 -0400 |
commit | 866e24d47db1743dfcff5bd595b57e3a143f2cb1 (patch) | |
tree | 8a0ed0502ebba60526dcb77f13522c6cae4684e9 /src/backend/access/transam/multixact.c | |
parent | f8721bd752790859df747905bc44fb5ad8dbf07d (diff) |
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
Diffstat (limited to 'src/backend/access/transam/multixact.c')
-rw-r--r-- | src/backend/access/transam/multixact.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/backend/access/transam/multixact.c b/src/backend/access/transam/multixact.c index 6ccdc5b58cb..43653fe5721 100644 --- a/src/backend/access/transam/multixact.c +++ b/src/backend/access/transam/multixact.c @@ -736,6 +736,25 @@ ReadNextMultiXactId(void) } /* + * 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 * |