Re: PostgreSQL debug log doesn't record whole procedure(from receiving request to sending response) - Mailing list pgsql-general

From Tom Lane
Subject Re: PostgreSQL debug log doesn't record whole procedure(from receiving request to sending response)
Date
Msg-id 2122088.1636988967@sss.pgh.pa.us
Whole thread Raw
In response to 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>)
Responses RE: 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>)
List 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 by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: help with a query
Next
From: Francisco Olarte
Date:
Subject: Re: help with a query