Fix heap_page_prune() parameter order confusion introduced in dc7420c2c92.
authorAndres Freund <[email protected]>
Tue, 16 Feb 2021 01:12:12 +0000 (17:12 -0800)
committerAndres Freund <[email protected]>
Tue, 16 Feb 2021 01:12:12 +0000 (17:12 -0800)
Both luckily and unluckily the passed values meant the same for all
types. Luckily because that meant my confusion caused no harm,
unluckily because otherwise the compiler might have warned...

In passing, synchronize parameter names between definition and
declaration.

Reported-By: Peter Geoghegan <[email protected]>
Author: Andres Freund <[email protected]>
Discussion: https://postgr.es/m/CAH2-Wz=L=nBoepQdH9b5Qd0nMvepFT2CnT6sjWvvpOXa=K8HVQ@mail.gmail.com

src/backend/access/heap/vacuumlazy.c
src/include/access/heapam.h

index e9bd6dba80f758c6392eff5825e50b1d35e89fc8..0bb78162f546d0a93a259dfc694d9d78df06e1b2 100644 (file)
@@ -1237,8 +1237,8 @@ lazy_scan_heap(Relation onerel, VacuumParams *params, LVRelStats *vacrelstats,
         * We count tuples removed by the pruning step as removed by VACUUM
         * (existing LP_DEAD line pointers don't count).
         */
-       tups_vacuumed += heap_page_prune(onerel, buf, vistest, false,
-                                        InvalidTransactionId, 0,
+       tups_vacuumed += heap_page_prune(onerel, buf, vistest,
+                                        InvalidTransactionId, 0, false,
                                         &vacrelstats->latestRemovedXid,
                                         &vacrelstats->offnum);
 
index d96a47b1cec1338e62e146004e4c838d99ae8d77..60e5cd3109bd6d5cb549e833063ffb0bbbf15d12 100644 (file)
@@ -174,8 +174,8 @@ struct GlobalVisState;
 extern void heap_page_prune_opt(Relation relation, Buffer buffer);
 extern int heap_page_prune(Relation relation, Buffer buffer,
                            struct GlobalVisState *vistest,
-                           TransactionId limited_oldest_xmin,
-                           TimestampTz limited_oldest_ts,
+                           TransactionId old_snap_xmin,
+                           TimestampTz old_snap_ts_ts,
                            bool report_stats, TransactionId *latestRemovedXid,
                            OffsetNumber *off_loc);
 extern void heap_page_prune_execute(Buffer buffer,