Skip to content

Commit 8c233cf

Browse files
vacuumlazy.c: Tweak local variable name.
Make a local variable name consistent with the name from its WAL record. Extracted from a larger patch to deal with issues with how vacuumlazy.c sets pages all-frozen. Author: Peter Geoghegan <pg@bowt.ie> Discussion: https://postgr.es/m/CAH2-WznuNGSzF8v6OsgjaC5aYsb3cZ6HW6MLm30X0d65cmSH6A@mail.gmail.com
1 parent 5076770 commit 8c233cf

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/backend/access/heap/vacuumlazy.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2478,7 +2478,7 @@ lazy_vacuum_heap_page(LVRelState *vacrel, BlockNumber blkno, Buffer buffer,
24782478
VacDeadItems *dead_items = vacrel->dead_items;
24792479
Page page = BufferGetPage(buffer);
24802480
OffsetNumber unused[MaxHeapTuplesPerPage];
2481-
int uncnt = 0;
2481+
int nunused = 0;
24822482
TransactionId visibility_cutoff_xid;
24832483
bool all_frozen;
24842484
LVSavedErrInfo saved_err_info;
@@ -2508,10 +2508,10 @@ lazy_vacuum_heap_page(LVRelState *vacrel, BlockNumber blkno, Buffer buffer,
25082508

25092509
Assert(ItemIdIsDead(itemid) && !ItemIdHasStorage(itemid));
25102510
ItemIdSetUnused(itemid);
2511-
unused[uncnt++] = toff;
2511+
unused[nunused++] = toff;
25122512
}
25132513

2514-
Assert(uncnt > 0);
2514+
Assert(nunused > 0);
25152515

25162516
/* Attempt to truncate line pointer array now */
25172517
PageTruncateLinePointerArray(page);
@@ -2527,13 +2527,13 @@ lazy_vacuum_heap_page(LVRelState *vacrel, BlockNumber blkno, Buffer buffer,
25272527
xl_heap_vacuum xlrec;
25282528
XLogRecPtr recptr;
25292529

2530-
xlrec.nunused = uncnt;
2530+
xlrec.nunused = nunused;
25312531

25322532
XLogBeginInsert();
25332533
XLogRegisterData((char *) &xlrec, SizeOfHeapVacuum);
25342534

25352535
XLogRegisterBuffer(0, buffer, REGBUF_STANDARD);
2536-
XLogRegisterBufData(0, (char *) unused, uncnt * sizeof(OffsetNumber));
2536+
XLogRegisterBufData(0, (char *) unused, nunused * sizeof(OffsetNumber));
25372537

25382538
recptr = XLogInsert(RM_HEAP2_ID, XLOG_HEAP2_VACUUM);
25392539

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy