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: Hide instability in stats.spec with -DCATCACHE_FORCE_REL
Date: Fri, 08 Apr 2022 01:22:58 +0000
Message-ID: <E1ncdKz-000osR-Lr@gemulon.postgresql.org> (raw)

pgstat: Hide instability in stats.spec with -DCATCACHE_FORCE_RELEASE.

With -DCATCACHE_FORCE_RELEASE a few tests failed. Those were trying to test
behavior in the absence of invalidation processing and
-DCATCACHE_FORCE_RELEASE obviously adds a lot of invalidation processing. The
test already tried to handle debug_discard_caches > 0, by disabling it for
individual tests.

Instead hide potentially problematic function calls in a wrapper function that
catches the does-not-exist error. The error isn't the actually interesting
bit, it's whether the stats entry still exist afterwards.

I confirmed that the tests still catches leaked function stats if I nuke the
protections against that in pgstat_function.c.

Per buildfarm animal prion.

Discussion: https://postgr.es/m/20220407165709.jgdkrzqlkcwue6ko@alap3.anarazel.de

Branch
------
master

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

Modified Files
--------------
src/test/isolation/expected/stats.out   | 152 ++++++++++++++++----------------
src/test/isolation/expected/stats_1.out | 152 ++++++++++++++++----------------
src/test/isolation/specs/stats.spec     |  38 ++++----
3 files changed, 172 insertions(+), 170 deletions(-)



Message-ID: <E1ncdKz-000osR-Lr@gemulon.postgresql.org>
Permalink:  ../E1ncdKz-000osR-Lr@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1ncdKz-000osR-Lr@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: Hide instability in stats.spec with -DCATCACHE_FORCE_REL
  In-Reply-To: <E1ncdKz-000osR-Lr@gemulon.postgresql.org>
  References: <E1ncdKz-000osR-Lr@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