pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: pgstat: fix small bug in pgstat_drop_relation().
Date: Thu, 07 Apr 2022 06:39:53 +0000
Message-ID: <E1ncLo9-000hD7-1t@gemulon.postgresql.org> (raw)

pgstat: fix small bug in pgstat_drop_relation().

Just after committing 5891c7a8ed8, a test running with debug_discard_caches=1
failed locally...

pgstat_drop_relation() neither checked pgstat_should_count_relation() nor
called pgstat_prep_relation_pending(). With debug_discard_caches=1
rel->pgstat_info wasn't set up, leading pg_stat_get_xact_tuples_inserted()
spuriously still returning > 0 while in the transaction dropping the table.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/5e07d3d6bdbff998eb68c131ecd10c448b026e47

Modified Files
--------------
src/backend/utils/activity/pgstat_relation.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)



Message-ID: <E1ncLo9-000hD7-1t@gemulon.postgresql.org>
Permalink:  ../E1ncLo9-000hD7-1t@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1ncLo9-000hD7-1t@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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: andres@anarazel.de
  Subject: Re: pgsql: pgstat: fix small bug in pgstat_drop_relation().
  In-Reply-To: <E1ncLo9-000hD7-1t@gemulon.postgresql.org>
  References: <E1ncLo9-000hD7-1t@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