Fix more holes with SLRU code in need of int64 for segment numbers
This is a continuation of 3937cadfd4
, taking care of more areas I have
managed to miss previously.
Reported-by: Noah Misch
Reviewed-by: Noah Misch
Discussion: https://postgr.es/m/20240724130059.1f.nmisch@google.com
Backpatch-through: 17
This commit is contained in:
parent
0dcaea5690
commit
c9e2457390
|
@ -3050,7 +3050,8 @@ PerformMembersTruncation(MultiXactOffset oldestOffset, MultiXactOffset newOldest
|
|||
*/
|
||||
while (segment != endsegment)
|
||||
{
|
||||
elog(DEBUG2, "truncating multixact members segment %x", segment);
|
||||
elog(DEBUG2, "truncating multixact members segment %llx",
|
||||
(unsigned long long) segment);
|
||||
SlruDeleteSegment(MultiXactMemberCtl, segment);
|
||||
|
||||
/* move to next segment, handling wraparound correctly */
|
||||
|
@ -3201,14 +3202,14 @@ TruncateMultiXact(MultiXactId newOldestMulti, Oid newOldestMultiDB)
|
|||
}
|
||||
|
||||
elog(DEBUG1, "performing multixact truncation: "
|
||||
"offsets [%u, %u), offsets segments [%x, %x), "
|
||||
"members [%u, %u), members segments [%x, %x)",
|
||||
"offsets [%u, %u), offsets segments [%llx, %llx), "
|
||||
"members [%u, %u), members segments [%llx, %llx)",
|
||||
oldestMulti, newOldestMulti,
|
||||
MultiXactIdToOffsetSegment(oldestMulti),
|
||||
MultiXactIdToOffsetSegment(newOldestMulti),
|
||||
(unsigned long long) MultiXactIdToOffsetSegment(oldestMulti),
|
||||
(unsigned long long) MultiXactIdToOffsetSegment(newOldestMulti),
|
||||
oldestOffset, newOldestOffset,
|
||||
MXOffsetToMemberSegment(oldestOffset),
|
||||
MXOffsetToMemberSegment(newOldestOffset));
|
||||
(unsigned long long) MXOffsetToMemberSegment(oldestOffset),
|
||||
(unsigned long long) MXOffsetToMemberSegment(newOldestOffset));
|
||||
|
||||
/*
|
||||
* Do truncation, and the WAL logging of the truncation, in a critical
|
||||
|
@ -3461,14 +3462,14 @@ multixact_redo(XLogReaderState *record)
|
|||
SizeOfMultiXactTruncate);
|
||||
|
||||
elog(DEBUG1, "replaying multixact truncation: "
|
||||
"offsets [%u, %u), offsets segments [%x, %x), "
|
||||
"members [%u, %u), members segments [%x, %x)",
|
||||
"offsets [%u, %u), offsets segments [%llx, %llx), "
|
||||
"members [%u, %u), members segments [%llx, %llx)",
|
||||
xlrec.startTruncOff, xlrec.endTruncOff,
|
||||
MultiXactIdToOffsetSegment(xlrec.startTruncOff),
|
||||
MultiXactIdToOffsetSegment(xlrec.endTruncOff),
|
||||
(unsigned long long) MultiXactIdToOffsetSegment(xlrec.startTruncOff),
|
||||
(unsigned long long) MultiXactIdToOffsetSegment(xlrec.endTruncOff),
|
||||
xlrec.startTruncMemb, xlrec.endTruncMemb,
|
||||
MXOffsetToMemberSegment(xlrec.startTruncMemb),
|
||||
MXOffsetToMemberSegment(xlrec.endTruncMemb));
|
||||
(unsigned long long) MXOffsetToMemberSegment(xlrec.startTruncMemb),
|
||||
(unsigned long long) MXOffsetToMemberSegment(xlrec.endTruncMemb));
|
||||
|
||||
/* should not be required, but more than cheap enough */
|
||||
LWLockAcquire(MultiXactTruncationLock, LW_EXCLUSIVE);
|
||||
|
|
Loading…
Reference in New Issue