Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 642aadf

Browse files
committed
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
1 parent 73e47b7 commit 642aadf

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

contrib/pg_stat_statements/pg_stat_statements.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -955,10 +955,13 @@ pgss_ProcessUtility(Node *parsetree, const char *queryString,
955955
* calculated from the query tree) would be used to accumulate costs of
956956
* ensuing EXECUTEs. This would be confusing, and inconsistent with other
957957
* cases where planning time is not included at all.
958+
*
959+
* Likewise, we don't track execution of DEALLOCATE.
958960
*/
959961
if (pgss_track_utility && pgss_enabled() &&
960962
!IsA(parsetree, ExecuteStmt) &&
961-
!IsA(parsetree, PrepareStmt))
963+
!IsA(parsetree, PrepareStmt) &&
964+
!IsA(parsetree, DeallocateStmt))
962965
{
963966
instr_time start;
964967
instr_time duration;

0 commit comments

Comments
 (0)