mirror of
https://github.com/postgres/postgres.git
synced 2025-11-09 06:21:09 +03:00
Generate pg_stat_get*() functions for tables using macros
The same code pattern is repeated 17 times for int64 counters (0 for missing entry) and 5 times for timestamps (NULL for missing entry) on table entries. This code is switched to use a macro for the basic code instead, shaving a few hundred lines of originally-duplicated code. The function names remain the same, but some fields of PgStat_StatTabEntry have to be renamed to cope with the new style. Author: Bertrand Drouvot Reviewed-by: Nathan Bossart Discussion: https:/postgr.es/m/20221204173207.GA2669116@nathanxps13
This commit is contained in:
@@ -271,7 +271,7 @@ physical tuple by eliminating an intermediate heap-only tuple or
|
||||
replacing a physical root tuple by a redirect pointer, a decrement in
|
||||
the table's number of dead tuples is reported to pgstats, which may
|
||||
postpone autovacuuming. Note that we do not count replacing a root tuple
|
||||
by a DEAD line pointer as decrementing n_dead_tuples; we still want
|
||||
by a DEAD line pointer as decrementing dead_tuples; we still want
|
||||
autovacuum to run to clean up the index entries and DEAD item.
|
||||
|
||||
This area probably needs further work ...
|
||||
|
||||
Reference in New Issue
Block a user