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: injection_points: Tweak variable-numbered stats to work with pen
Date: Mon, 30 Dec 2024 09:59:09 +0000
Message-ID: <E1tSCYH-0026bV-3v@gemulon.postgresql.org> (raw)

injection_points: Tweak variable-numbered stats to work with pending data

As coded, the module was not using pending entries to store its data
locally before doing a flush to the central dshash with a timed
pgstat_report_stat() call.  Hence, the flush callback was defined, but
finished by being not used.  As a template, this is more efficient than
the original logic of updating directly the shared memory entries as
this reduces the interactions that need to be done with the pgstats
hash table in shared memory.

injection_stats_flush_cb() was also missing a pgstat_unlock_entry(), so
add one, while on it.

Reviewed-by: Bertrand Drouvot
Discussion: https://postgr.es/m/Z3JbLhKFFm6kKfT8@ip-10-97-1-34.eu-west-3.compute.internal

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/b757abefc0419c9b742222e1dfe70c73aff67364

Modified Files
--------------
src/test/modules/injection_points/injection_stats.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)



Message-ID: <E1tSCYH-0026bV-3v@gemulon.postgresql.org>
Permalink:  ../E1tSCYH-0026bV-3v@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1tSCYH-0026bV-3v@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: injection_points: Tweak variable-numbered stats to work with pen
  In-Reply-To: <E1tSCYH-0026bV-3v@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