]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Add compute_query_id = regress
authorMichael Paquier <michael@paquier.xyz>
Tue, 22 Feb 2022 01:23:49 +0000 (10:23 +0900)
committerMichael Paquier <michael@paquier.xyz>
Tue, 22 Feb 2022 01:23:49 +0000 (10:23 +0900)
commit627c79a1e87d9ec4a8a8a0c5be8564ba74e221ea
tree50bd07c2cb4938bcc7c48eee8dda441400654566
parent7bbfe5994165aef9e903b1919d625fe87d4f146e
Add compute_query_id = regress

"regress" is a new mode added to compute_query_id aimed at facilitating
regression testing when a module computing query IDs is loaded into the
backend, like pg_stat_statements.  It works the same way as "auto",
meaning that query IDs are computed if a module enables it, except that
query IDs are hidden in EXPLAIN outputs to ensure regression output
stability.

Like any GUCs of the kind (force_parallel_mode, etc.), this new
configuration can be added to an instance's postgresql.conf, or just
passed down with PGOPTIONS at command level.  compute_query_id uses an
enum for its set of option values, meaning that this addition ensures
ABI compatibility.

Using this new configuration mode allows installcheck-world to pass when
running the tests on an instance with pg_stat_statements enabled,
stabilizing the test output while checking the paths doing query ID
computations.

Reported-by: Anton Melnikov
Reviewed-by: Julien Rouhaud
Discussion: https://postgr.es/m/1634283396.372373993@f75.i.mail.ru
Discussion: https://postgr.es/m/YgHlxgc/OimuPYhH@paquier.xyz
Backpatch-through: 14
doc/src/sgml/config.sgml
src/backend/commands/explain.c
src/backend/utils/misc/guc.c
src/include/utils/queryjumble.h