git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 941aa6a) | patch
Generate pg_stat_get*() functions for tables using macros
Tue, 6 Dec 2022 01:46:35 +0000 (10:46 +0900)
Tue, 6 Dec 2022 01:46:35 +0000 (10:46 +0900)
commit 83a1a1b56645b7a55ec00e44f8018116ee87c720
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
src/backend/access/heap/README.HOT diff | blob | blame | history
src/backend/postmaster/autovacuum.c diff | blob | blame | history
src/backend/utils/activity/pgstat_relation.c diff | blob | blame | history
src/backend/utils/adt/pgstatfuncs.c diff | blob | blame | history
src/include/pgstat.h diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /