pgsql: Force testing of query jumbling in 027_stream_regress.pl

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Force testing of query jumbling in 027_stream_regress.pl
Date: 2023-03-03 01:43:26
Message-ID: E1pXuSD-001c4N-PH@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Force testing of query jumbling in 027_stream_regress.pl

Coverage of the query jumbling code has always relied on the queries
included in the regression tests of pg_stat_statements. This has its
limitations, as a lot of query patterns have never really stressed the
query jumbling code. The situation got a bit worse since the query
jumbling has been added in the backend core code (5fd9dfa), hence new
nodes that should be included in the jumbling could easily be missed,
resulting in failures in pg_stat_statements or any modules that require
query ID computations. Forcing a load of pg_stat_statements in
027_stream_regress.pl ensures that nodes are never missed in the
computations, without having to rely on a buildfarm member for this
check.

Before this commit, the line coverage of queryjumblefuncs.funcs.c was
around 48.5%, now up to 94.6% just by running 027_stream_regress.pl.
A basic check is added to show that pg_stat_statements reports are
generated after the main regression test suite is finished.

Discussion: https://postgr.es/m/Y+nD9LN70w+8eaG9@paquier.xyz

Branch
------
master

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

Modified Files
--------------
src/test/recovery/Makefile | 2 +-
src/test/recovery/README | 3 ++-
src/test/recovery/t/027_stream_regress.pl | 33 +++++++++++++++++++++++++++++++
3 files changed, 36 insertions(+), 2 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2023-03-03 06:06:29 pgsql: Fix incorrect format placeholders
Previous Message Michael Paquier 2023-03-02 23:47:05 pgsql: Refactor more the regression tests of pg_stat_statements