Re: Log a sample of transactions

From: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
To: Adrien Mobile <adrien(dot)nayrat(at)anayrat(dot)info>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>, Nikolay Samokhvalov <samokhvalov(at)gmail(dot)com>
Subject: Re: Log a sample of transactions
Date: 2019-01-15 10:42:08
Message-ID: CAD21AoCh8S26UyMJSTgyVUuwXSDVmTt-pO2097SjOUpf5-k2Tw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Jan 5, 2019 at 12:57 AM Adrien Mobile
<adrien(dot)nayrat(at)anayrat(dot)info> wrote:
>
> Le 4 janvier 2019 13:20:09 GMT+01:00, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> a écrit :
> >On 12/12/2018 22:32, Adrien Nayrat wrote:
> >> Per idea of Nikolay Samokhvalov[1] I propose this patch to add the
> >possibility
> >> to log all statements from a fraction of transactions.
> >>
> >> I have several questions:
> >> * Do we want this feature?
> >
> >It's not clear to me what the use is. The per-statement sampling
> >allows
> >you to capture slow queries without overwhelming the logs. We don't
> >have any logging of slow transactions or any other transaction scope
> >logging, so what will this sample?
> >
> >--
> >Peter Eisentraut http://www.2ndQuadrant.com/
> >PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
>
> Hello,
> When you troubleshoot applicative issues with multi-statements transaction, you may have to log all queries to find all statements of one transaction. With high throughput, it could be hard to log all queries without causing troubles.

Hm, can we use log_min_duration_statement to find slow queries of a
transaction instead? Could you please elaborate on the use-case?

Regards,

--
Masahiko Sawada
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Gierth 2019-01-15 10:49:37 Re: SPI Interface to Call Procedure with Transaction Control Statements?
Previous Message Andrew Gierth 2019-01-15 10:37:58 Re: Ryu floating point output patch