RE: libpq debug log

Поиск
Список
Период
Сортировка
Искать
От
tsunakawa.takay@fujitsu.com
Тема
RE: libpq debug log
Дата
Msg-id
TYAPR01MB299039FF61225CE7F886441DFE8E9@TYAPR01MB2990.jpnprd01.prod.outlook.com
Ответ на
RE: libpq debug log (iwata.aya@fujitsu.com)
Список
Дерево обсуждения
RE: libpq debug log "Iwata, Aya" <iwata.aya@jp.fujitsu.com>
From: Iwata, Aya/岩田 彩 
> I update the patch.
> I modified code according to review comments of Tsunakawa san and
> Horiguchi san.


I confirmed that all the previous feedback was reflected.  Here are some minor comments:


(45)
 void PQtrace(PGconn *conn, FILE *stream);
 
      
 
+     
+      Calls PQtraceEx to output with or without a timestamp
+      using flags.
+     
+
+     
+      flags contains flag bits describing the operating mode
+      of tracing.  If (flags contains PQTRACE_SUPPRESS_TIMESTAMPS),
+      then timestamp is not printed with each message.

The description of PQtrace() should be written independent of PQtraceEx().  It is an unnecessary implementation detail to the user that PQtrace() calls PQtraceEx() internally.  Plus, a separate entry for PQtraceEx() needs to be added.


(46)

If skipLogging is intended for use with backend -> frontend messages only, shouldn't it be placed in conn->b_msg?


(47)
+	/* Deallocate FE/BE message tracking memory. */
+	if (conn->fe_msg &&
+		/*
+		 * If fields is allocated the initial size, we reuse it next time,
+		 * because it would be allocated same size and the size is not big.
+		 */
+			conn->fe_msg->max_fields != DEF_FE_MSGFIELDS)

I'm not completely sure if other places interpose a block comment like this between if/for/while conditions, but I think it's better to put the comment before if.


Regards
Takayuki Tsunakawa


В списке pgsql-hackers по дате отправления
От: kuroda.hayato@fujitsu.com
Дата:
От: Amit Kapila
Дата:
FAQ