diff options
author | Michael Paquier | 2024-02-13 22:20:15 +0000 |
---|---|---|
committer | Michael Paquier | 2024-02-13 22:20:15 +0000 |
commit | f854dae888ab69db92153369644951dfb5b3d034 (patch) | |
tree | 80bf3d0065fb000ebe26ec19dd1fd292f5bbda6c | |
parent | 5ebc9c90173f32cffe373a80835f157b9ebfa3bd (diff) |
Improve comment about query_id_enabled in queryjumblefuncs.c
The comment was inexact because query_id_enabled will not be switched to
"true" even if compute_query_id is "on", unless a module requests for
it.
While on it, this adds a comment to mention that IsQueryIdEnabled()
should be used to check if query ID computation is enabled or not.
Author: Yugo Nagata
Reviewed-by: Julien Rouhaud
Discussion: https://postgr.es/m/[email protected]
-rw-r--r-- | src/backend/nodes/queryjumblefuncs.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/backend/nodes/queryjumblefuncs.c b/src/backend/nodes/queryjumblefuncs.c index e489bfceb5..82f725baaa 100644 --- a/src/backend/nodes/queryjumblefuncs.c +++ b/src/backend/nodes/queryjumblefuncs.c @@ -42,7 +42,13 @@ /* GUC parameters */ int compute_query_id = COMPUTE_QUERY_ID_AUTO; -/* True when compute_query_id is ON, or AUTO and a module requests them */ +/* + * True when compute_query_id is ON or AUTO, and a module requests them. + * + * Note that IsQueryIdEnabled() should be used instead of checking + * query_id_enabled or compute_query_id directly when we want to know + * whether query identifiers are computed in the core or not. + */ bool query_id_enabled = false; static void AppendJumble(JumbleState *jstate, |