pgsql: pgstat: introduce pgstat_relation_should_count(). - Mailing list pgsql-committers

From Andres Freund
Subject pgsql: pgstat: introduce pgstat_relation_should_count().
Date
Msg-id E1nW7Xq-000eN9-H5@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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

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(-)


pgsql-committers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: pgsql: Enforce foreign key correctly during cross-partition updates
Next
From: Magnus Hagander
Date:
Subject: Re: pgsql: Allow extensions to add new backup targets.