Force testing of query jumbling in 027_stream_regress.pl
commitd28a449854202d0a409e13e2e73f78373da1ed75
authorMichael Paquier <michael@paquier.xyz>
Fri, 3 Mar 2023 01:41:51 +0000 (3 10:41 +0900)
committerMichael Paquier <michael@paquier.xyz>
Fri, 3 Mar 2023 01:41:51 +0000 (3 10:41 +0900)
treecd3bc5c112a71549f79d37bb32e0b4786c2bed8c
parentd0028e35a05ac71aebf28325c8ddb59a27cb63c0
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
src/test/recovery/Makefile
src/test/recovery/README
src/test/recovery/t/027_stream_regress.pl