From cafde58b337e007cb6a719f5ab4dd6459d932a39 Mon Sep 17 00:00:00 2001 From: Alvaro Herrera Date: Sat, 15 May 2021 14:13:09 -0400 Subject: Allow compute_query_id to be set to 'auto' and make it default Allowing only on/off meant that all either all existing configuration guides would become obsolete if we disabled it by default, or that we would have to accept a performance loss in the default config if we enabled it by default. By allowing 'auto' as a middle ground, the performance cost is only paid by those who enable pg_stat_statements and similar modules. I only edited the release notes to comment-out a paragraph that is now factually wrong; further edits are probably needed to describe the related change in more detail. Author: Julien Rouhaud Reviewed-by: Justin Pryzby Discussion: https://postgr.es/m/20210513002623.eugftm4nk2lvvks3@nol --- src/backend/commands/explain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/backend/commands/explain.c') diff --git a/src/backend/commands/explain.c b/src/backend/commands/explain.c index 1202bf85a36..9a60865d191 100644 --- a/src/backend/commands/explain.c +++ b/src/backend/commands/explain.c @@ -245,7 +245,7 @@ ExplainQuery(ParseState *pstate, ExplainStmt *stmt, es->summary = (summary_set) ? es->summary : es->analyze; query = castNode(Query, stmt->query); - if (compute_query_id) + if (IsQueryIdEnabled()) jstate = JumbleQuery(query, pstate->p_sourcetext); if (post_parse_analyze_hook) -- cgit v1.2.3