summaryrefslogtreecommitdiff
path: root/src/backend/storage/lmgr/predicate.c
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2024-07-23 17:59:20 +0900
committerMichael Paquier <michael@paquier.xyz>2024-07-23 17:59:20 +0900
commit165ea79a60774a0e287bfc5dc07363194c6d58df (patch)
treec081446e5d82023c0b19a4aab5abd64187c201ed /src/backend/storage/lmgr/predicate.c
parent3b279d89cb5c86fa7ac6faaebb3ddadb2dbe0ca8 (diff)
Use more consistently int64 for page numbers in SLRU-related code
clog.c, async.c and predicate.c included some SLRU page numbers still handled as 4-byte integers, while int64 should be used for this purpose. These holes have been introduced in 4ed8f0913bfd, that has introduced the use of 8-byte integers for SLRU page numbers, still forgot about the code paths updated by this commit. Reported-by: Noah Misch Author: Aleksander Alekseev, Michael Paquier Discussion: https://postgr.es/m/20240626002747.dc.nmisch@google.com Backpatch-through: 17
Diffstat (limited to 'src/backend/storage/lmgr/predicate.c')
-rw-r--r--src/backend/storage/lmgr/predicate.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/storage/lmgr/predicate.c b/src/backend/storage/lmgr/predicate.c
index 93841654db3..b455b78f9f7 100644
--- a/src/backend/storage/lmgr/predicate.c
+++ b/src/backend/storage/lmgr/predicate.c
@@ -344,7 +344,7 @@ static SlruCtlData SerialSlruCtlData;
typedef struct SerialControlData
{
- int headPage; /* newest initialized page */
+ int64 headPage; /* newest initialized page */
TransactionId headXid; /* newest valid Xid in the SLRU */
TransactionId tailXid; /* oldest xmin we might be interested in */
} SerialControlData;
@@ -1035,7 +1035,7 @@ SerialSetActiveSerXmin(TransactionId xid)
void
CheckPointPredicate(void)
{
- int truncateCutoffPage;
+ int64 truncateCutoffPage;
LWLockAcquire(SerialControlLock, LW_EXCLUSIVE);
@@ -1048,7 +1048,7 @@ CheckPointPredicate(void)
if (TransactionIdIsValid(serialControl->tailXid))
{
- int tailPage;
+ int64 tailPage;
tailPage = SerialPage(serialControl->tailXid);