OSDN Git Service

Catch up the changes of pg_stat_statements.c
authorKyotaro Horiguchi <horiguchi.kyotaro@lab.ntt.co.jp>
Mon, 22 Dec 2014 02:07:09 +0000 (11:07 +0900)
committerKyotaro Horiguchi <horiguchi.kyotaro@lab.ntt.co.jp>
Mon, 22 Dec 2014 02:32:20 +0000 (11:32 +0900)
The change has nothing to do with pg_hint_plan but it's necessary to
catch it up in order to keep the difference minimal for the ease of
maintenance.

pg_stat_statements.c

index 5f869c2..7304565 100644 (file)
@@ -82,7 +82,6 @@
 #include "utils/builtins.h"
 #include "utils/memutils.h"
 
-
 PG_MODULE_MAGIC;
 
 /* Location of permanent stats file (valid when database is shut down) */
@@ -965,10 +964,13 @@ pgss_ProcessUtility(Node *parsetree, const char *queryString,
         * calculated from the query tree) would be used to accumulate costs of
         * ensuing EXECUTEs.  This would be confusing, and inconsistent with other
         * cases where planning time is not included at all.
+        *
+        * Likewise, we don't track execution of DEALLOCATE.
         */
        if (pgss_track_utility && pgss_enabled() &&
                !IsA(parsetree, ExecuteStmt) &&
-               !IsA(parsetree, PrepareStmt))
+               !IsA(parsetree, PrepareStmt) &&
+               !IsA(parsetree, DeallocateStmt))
        {
                instr_time      start;
                instr_time      duration;
@@ -2407,6 +2409,7 @@ JumbleExpr(pgssJumbleState *jstate, Node *node)
                                SubLink    *sublink = (SubLink *) node;
 
                                APP_JUMB(sublink->subLinkType);
+                               APP_JUMB(sublink->subLinkId);
                                JumbleExpr(jstate, (Node *) sublink->testexpr);
                                JumbleQuery(jstate, (Query *) sublink->subselect);
                        }