Skip to content

Commit 6f40ee4

Browse files
committed
pg_stat_statements: add missing check for pgss_enabled().
Make pgss_post_parse_analyze() more consistent with the other hooks, and avoid unnecessary overhead when pg_stat_statements.track=none. Author: Raymond Martin Reviewed-by: Fabien COELHO Discussion: https://postgr.es/m/BN8PR21MB1217B003C4F79DE230AA36B9B1580%40BN8PR21MB1217.namprd21.prod.outlook.com
1 parent 4214668 commit 6f40ee4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contrib/pg_stat_statements/pg_stat_statements.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,7 @@ pgss_post_parse_analyze(ParseState *pstate, Query *query)
788788
Assert(query->queryId == UINT64CONST(0));
789789

790790
/* Safety check... */
791-
if (!pgss || !pgss_hash)
791+
if (!pgss || !pgss_hash || !pgss_enabled())
792792
return;
793793

794794
/*

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy