Re: An obsolete comment of pg_stat_statements

Поиск
Список
Период
Сортировка
От Kyotaro Horiguchi
Тема Re: An obsolete comment of pg_stat_statements
Дата
Msg-id 20211122.154840.281146309505902849.horikyota.ntt@gmail.com
обсуждение исходный текст
Ответ на An obsolete comment of pg_stat_statements  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Ответы Re: An obsolete comment of pg_stat_statements  (Julien Rouhaud <rjuju123@gmail.com>)
Список pgsql-hackers
At Mon, 22 Nov 2021 15:38:23 +0900 (JST), Kyotaro Horiguchi <horikyota.ntt@gmail.com> wrote in 
>  * queryId is supposed to be a valid value, otherwise this function dosen't
>  * calucate it by its own as before then returns immediately.

Mmm. That's bad. This is the correted version.

 * queryId is supposed to be a valid value, otherwise this function doesn't
 * calculate it by its own as before then returns immediately.

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center
diff --git a/contrib/pg_stat_statements/pg_stat_statements.c b/contrib/pg_stat_statements/pg_stat_statements.c
index 726ba59e2b..7bd7ecf7b5 100644
--- a/contrib/pg_stat_statements/pg_stat_statements.c
+++ b/contrib/pg_stat_statements/pg_stat_statements.c
@@ -1191,10 +1191,6 @@ pgss_ProcessUtility(PlannedStmt *pstmt, const char *queryString,
 /*
  * Store some statistics for a statement.
  *
- * If queryId is 0 then this is a utility statement for which we couldn't
- * compute a queryId during parse analysis, and we should compute a suitable
- * queryId internally.
- *
  * If jstate is not NULL then we're trying to create an entry for which
  * we have no statistics as yet; we just want to record the normalized
  * query string.  total_time, rows, bufusage and walusage are ignored in this
@@ -1202,6 +1198,9 @@ pgss_ProcessUtility(PlannedStmt *pstmt, const char *queryString,
  *
  * If kind is PGSS_PLAN or PGSS_EXEC, its value is used as the array position
  * for the arrays in the Counters field.
+ *
+ * queryId is supposed to be a valid value, otherwise this function doesn't
+ * calculate it by its own as before then returns immediately.
  */
 static void
 pgss_store(const char *query, uint64 queryId,

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Kyotaro Horiguchi
Дата:
Сообщение: An obsolete comment of pg_stat_statements
Следующее
От: vignesh C
Дата:
Сообщение: Re: Optionally automatically disable logical replication subscriptions on error