pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add a new 'F' entry type for fixed-numbered stats in pgstats fil
Date: Thu, 11 Jul 2024 07:24:54 +0000
Message-ID: <E1sRoAg-001DMp-Nv@gemulon.postgresql.org> (raw)

Add a new 'F' entry type for fixed-numbered stats in pgstats file

This new entry type is used for all the fixed-numbered statistics,
making possible support for custom pluggable stats.  In short, we need
to be able to detect more easily if a stats kind exists or not when
reading back its data from the pgstats file without a dependency on the
order of the entries read.  The kind ID of the stats is added to the
data written.

The data is written in the same fashion as previously, with the
fixed-numbered stats first and the dshash entries next.  The read part
becomes more flexible, loading fixed-numbered stats into shared memory
based on the new entry type found.

Bump PGSTAT_FILE_FORMAT_ID.

Reviewed-by: Bertrand Drouvot
Discussion: https://postgr.es/m/Zot5bxoPYdS7yaoy@paquier.xyz

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/9e4664d950c125a1ff7bb29cd1593ca37f8b0c01

Modified Files
--------------
src/backend/utils/activity/pgstat.c | 51 ++++++++++++++++++++++++-------------
src/include/pgstat.h                |  2 +-
2 files changed, 34 insertions(+), 19 deletions(-)



Message-ID: <E1sRoAg-001DMp-Nv@gemulon.postgresql.org>
Permalink:  ../E1sRoAg-001DMp-Nv@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1sRoAg-001DMp-Nv@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Add a new 'F' entry type for fixed-numbered stats in pgstats fil
  In-Reply-To: <E1sRoAg-001DMp-Nv@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox