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: Refactor the TAP test of auto_explain
Date: Fri, 01 Jul 2022 00:14:57 +0000
Message-ID: <E1o74JE-000b4L-6e@gemulon.postgresql.org> (raw)

Refactor the TAP test of auto_explain

Previously, the tests were structured so as all the queries whose plans
are checked run first, followed by pattern checks using the full set of
server logs.  This can be problematic when extending the tests, as this
increases query plan overlaps, where two tests finish by having similar
plan outputs potentially invalidating the tests wanted.

The tests are refactored so as log content matches are checked in
isolation of each query run, by grabbing the position of the server logs
before running each query whose plan is generated in the logs.  This
avoids issues when extending the tests, something that would become a
larger problem with a follow-up patch that adds a new GUC in
auto_explain to control the size of the each parameter logged.

Author: Dagfinn Ilmari Mannsåker
Discussion: https://postgr.es/m/87ee09mohb.fsf@wibble.ilmari.org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/550bc0a6c0c6af20d34c16902f0ed977550396eb

Modified Files
--------------
contrib/auto_explain/t/001_auto_explain.pl | 90 ++++++++++++++++++++++++------
1 file changed, 74 insertions(+), 16 deletions(-)



Message-ID: <E1o74JE-000b4L-6e@gemulon.postgresql.org>
Permalink:  ../E1o74JE-000b4L-6e@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1o74JE-000b4L-6e@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: michael@paquier.xyz
  Subject: Re: pgsql: Refactor the TAP test of auto_explain
  In-Reply-To: <E1o74JE-000b4L-6e@gemulon.postgresql.org>
  References: <E1o74JE-000b4L-6e@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