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

Commit 3cd934f

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 73eba19 commit 3cd934f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

contrib/pg_stat_statements/pg_stat_statements.c

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

0 commit comments

Comments
 (0)