OSDN Git Service

Move misplaced comment.
authorJulien Rouhaud <julien.rouhaud@free.fr>
Sat, 6 Nov 2021 06:38:45 +0000 (14:38 +0800)
committerKyotaro Horiguchi <horikyota.ntt@gmail.com>
Thu, 25 Nov 2021 10:37:02 +0000 (19:37 +0900)
pg_store_plans.c

index 4023fcb..8c4f693 100644 (file)
@@ -782,6 +782,10 @@ pgsp_ExecutorEnd(QueryDesc *queryDesc)
 {
        if (queryDesc->totaltime)
        {
+               /*
+                * Make sure stats accumulation is done.  (Note: it's okay if several
+                * levels of hook all do this.)
+                */
                InstrEndLoop(queryDesc->totaltime);
 
                if (pgsp_enabled() &&
@@ -811,11 +815,6 @@ pgsp_ExecutorEnd(QueryDesc *queryDesc)
                        es_str->data[0] = '{';
                        es_str->data[es_str->len - 1] = '}';
 
-                       /*
-                        * Make sure stats accumulation is done.  (Note: it's okay if several
-                        * levels of hook all do this.)
-                        */
-
                        store_entry(es_str->data,
                                                hash_query(queryDesc->sourceText),
                                                queryDesc->plannedstmt->queryId,