pgsql: pgstat: introduce pgstat_relation_should_count().

Started by Andres Freundover 4 years ago1 messagescomitters
Jump to latest
#1Andres Freund
andres@anarazel.de

pgstat: introduce pgstat_relation_should_count().

A later commit will make the check more complicated than the
current (rel)->pgstat_info != NULL. It also just seems nicer to have a central
copy of the logic, even while still simple.

Author: Andres Freund <andres@anarazel.de>
Discussion: /messages/by-id/20220303021600.hs34ghqcw6zcokdh@alap3.anarazel.de

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/8363102009d8ee64255ad4948183f9d159eb8f4b

Modified Files
--------------
src/backend/catalog/index.c | 2 +-
src/backend/postmaster/pgstat.c | 36 +++++++++++++++++-------------------
src/include/pgstat.h | 17 ++++++++++-------
3 files changed, 28 insertions(+), 27 deletions(-)