mirror of
https://github.com/postgres/postgres.git
synced 2025-05-13 01:13:08 -04:00
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
This commit is contained in:
parent
4214668635
commit
6f40ee4f83
@ -788,7 +788,7 @@ pgss_post_parse_analyze(ParseState *pstate, Query *query)
|
||||
Assert(query->queryId == UINT64CONST(0));
|
||||
|
||||
/* Safety check... */
|
||||
if (!pgss || !pgss_hash)
|
||||
if (!pgss || !pgss_hash || !pgss_enabled())
|
||||
return;
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user