pgstat: introduce pgstat_relation_should_count().

Andres Freund <andres@anarazel.de>

Commit: 8363102009d8ee64255ad4948183f9d159eb8f4b
Author: Andres Freund <andres@anarazel.de>
Date: 2022-03-21T02:12:09Z
Releases: 15.0
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: https://postgr.es/m/20220303021600.hs34ghqcw6zcokdh@alap3.anarazel.de

Files

PathChange+/−
src/backend/catalog/index.c modified +1 −1
src/backend/postmaster/pgstat.c modified +17 −19
src/include/pgstat.h modified +10 −7

Discussion