mirror of
https://github.com/postgres/postgres.git
synced 2025-12-07 12:02:30 +03:00
Explain pruning pgstats accounting subtleties.
Add a comment explaining why the pgstats accounting used during opportunistic heap pruning operations (to maintain the current number of dead tuples in the relation) needs to compensate by subtracting away the number of new LP_DEAD items. This is needed so it can avoid completely forgetting about tuples that become LP_DEAD items during pruning -- they should still count. It seems more natural to discuss this issue at the only relevant call site (opportunistic pruning), since the same issue does not apply to the only other caller (the VACUUM call site). Move everything there too. Author: Peter Geoghegan <pg@bowt.ie> Discussion: https://postgr.es/m/CAH2-Wzm7f+A6ej650gi_ifTgbhsadVW5cujAL3punpupHff5Yg@mail.gmail.com
This commit is contained in:
@@ -186,7 +186,7 @@ extern int heap_page_prune(Relation relation, Buffer buffer,
|
||||
struct GlobalVisState *vistest,
|
||||
TransactionId old_snap_xmin,
|
||||
TimestampTz old_snap_ts_ts,
|
||||
bool report_stats,
|
||||
int *nnewlpdead,
|
||||
OffsetNumber *off_loc);
|
||||
extern void heap_page_prune_execute(Buffer buffer,
|
||||
OffsetNumber *redirected, int nredirected,
|
||||
|
||||
Reference in New Issue
Block a user