agora inbox for pgsql-committers@postgresql.org
help / color / mirror / Atom feedFrom: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add pgstat test for reset of dead/live counters with table trunc
Date: Fri, 04 Sep 2026 07:56:02 +0000
Message-ID: <E1x2OmH-00000003QCI-1cra@gemulon.postgresql.org> (raw)
Add pgstat test for reset of dead/live counters with table truncation
A patch has been proposed to refactor the table-level statistics to
treat the non-transactional and transactional parts as two separate
entities, in the scope of a larger piece of work to introduce
transactional flushes.
This commit adds a test for a pattern that has proved to be problematic
while splitting the relation stats data, and where we had no coverage
yet: an entry marked as truncdropped resets the live/dead counters in
the flush callback, leaving any other data intact. The code path
resetting the live/dead counters was covered, but nothing in the
regression tests checked the stats views for it.
Extracted from a larger patch by the same author.
Author: Sami Imseih <samimseih.pg@gmail.com>
Reviewed-by: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/aoU32VTkUtpdUewB@paquier.xyz
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/ac00b0f8bdc59152e0d5b5f97c979595e9a5e2ad
Modified Files
--------------
src/test/regress/expected/stats.out | 27 +++++++++++++++++++++++++--
src/test/regress/sql/stats.sql | 16 +++++++++++++++-
2 files changed, 40 insertions(+), 3 deletions(-)
Message-ID: <E1x2OmH-00000003QCI-1cra@gemulon.postgresql.org>
Permalink: ../E1x2OmH-00000003QCI-1cra@gemulon.postgresql.org/
Also on: postgresql.org/message-id/E1x2OmH-00000003QCI-1cra@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 pgstat test for reset of dead/live counters with table trunc
In-Reply-To: <E1x2OmH-00000003QCI-1cra@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 agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox