Re: PostgreSQL debug log doesn't record whole procedure(from receiving request to sending response)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: PostgreSQL debug log doesn't record whole procedure(from receiving request to sending response)
Дата
Msg-id 2122088.1636988967@sss.pgh.pa.us
обсуждение исходный текст
Ответ на PostgreSQL debug log doesn't record whole procedure(from receiving request to sending response)  ("Chen, Yan-Jack (NSB - CN/Hangzhou)" <yan-jack.chen@nokia-sbell.com>)
Ответы RE: PostgreSQL debug log doesn't record whole procedure(from receiving request to sending response)
Список pgsql-general
"Chen, Yan-Jack (NSB - CN/Hangzhou)" <yan-jack.chen@nokia-sbell.com> writes:
>   We recently encounter one issue about PostgreSQL ODBC client doesn¡¯t receive response from PostgreSQL server in
time(client set 5 seconds timeout) occasionally (1 or 2 times per 24 hours).  Both PostgreSQL and its client are
deployedin VM against. It took us days to debug where cause the timeout. We enable PostgreSQL server debug log via
belowconfiguration. 

We can see from this that the server spent 10 seconds in
CommitTransaction, so the question is what took so long.
I'd wonder first about end-of-transaction triggers (have you got foreign
keys on that table?  maybe an event trigger?), and then second about
delays in writing/fsyncing WAL (what's the underlying storage?  do you
have synchronous_commit replication turned on?).

> This mail is to ask why PostgreSQL debug log doesn¡¯t really include the response message delay which may cause
misleadingwhy troubleshooting. It looks to me the debug log doesn¡¯t record the whole procedure. If there are some
developeroptions include the missing part but we didn¡¯t enable? 

[ shrug... ] Sure, we could put an elog(DEBUG) after every line of code
in the server, and then high-level debugging logs would be even more
impossibly voluminous than they are now.  I'd say the existing logging
gave you plenty of clue where to look.

            regards, tom lane



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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: help with a query
Следующее
От: Francisco Olarte
Дата:
Сообщение: Re: help with a query