Content-Length: 258796 | pFad | http://github.com/postgrespro/postgres_cluster/commit/6f40ee4f837ec1ac59c8ddc73b67a04978a184d5

A6 pg_stat_statements: add missing check for pgss_enabled(). · postgrespro/postgres_cluster@6f40ee4 · GitHub
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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/6f40ee4f837ec1ac59c8ddc73b67a04978a184d5

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy