Commit 3cd934f6 authored by Heikki Linnakangas's avatar Heikki Linnakangas

Don't track DEALLOCATE in pg_stat_statements.

We also don't track PREPARE, nor do we track planning time in general, so
let's ignore DEALLOCATE as well for consistency.

Backpatch to 9.4, but not further than that. Although it seems unlikely that
anyone is relying on the current behavior, this is a behavioral change.

Fabien Coelho
parent 73eba19a
...@@ -954,10 +954,13 @@ pgss_ProcessUtility(Node *parsetree, const char *queryString, ...@@ -954,10 +954,13 @@ pgss_ProcessUtility(Node *parsetree, const char *queryString,
* calculated from the query tree) would be used to accumulate costs of * calculated from the query tree) would be used to accumulate costs of
* ensuing EXECUTEs. This would be confusing, and inconsistent with other * ensuing EXECUTEs. This would be confusing, and inconsistent with other
* cases where planning time is not included at all. * cases where planning time is not included at all.
*
* Likewise, we don't track execution of DEALLOCATE.
*/ */
if (pgss_track_utility && pgss_enabled() && if (pgss_track_utility && pgss_enabled() &&
!IsA(parsetree, ExecuteStmt) && !IsA(parsetree, ExecuteStmt) &&
!IsA(parsetree, PrepareStmt)) !IsA(parsetree, PrepareStmt) &&
!IsA(parsetree, DeallocateStmt))
{ {
instr_time start; instr_time start;
instr_time duration; instr_time duration;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment