Re: Log a sample of transactions

Peter Eisentraut <peter.eisentraut@2ndquadrant.com>

From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Adrien NAYRAT <adrien.nayrat@anayrat.info>, Masahiko Sawada <sawada.mshk@gmail.com>
Cc: PostgreSQL mailing lists <pgsql-hackers@postgresql.org>, Nikolay Samokhvalov <samokhvalov@gmail.com>
Date: 2019-01-18T08:03:18Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Tweak docs for log_statement_sample_rate

On 15/01/2019 18:03, Adrien NAYRAT wrote:
> The goal is not to find slow queries in a transaction, but troubleshoot 
> applicative issue when you have short queries.
> 
> Sometimes you want to understand what happens in a transaction, either 
> you perfectly know your application, either you have to log all queries 
> and find ones with the same transaction ID (%x). It could be problematic 
> if you have a huge traffic with fast queries.

But if you have trouble with a specific transaction, how will a setting
help that randomly logs transactions, not necessarily the one you are
concerned about?

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services