RE: Log a sample of transactions

Поиск
Список
Период
Сортировка
Искать
От
Kuroda, Hayato
Тема
RE: Log a sample of transactions
Дата
Msg-id
1F66B161998C704BABF8989B8A2AC0A316CB7E@G01JPEXMBYT05
Ответ на
Список
Дерево обсуждения
Log a sample of transactions Adrien Nayrat <adrien.nayrat@anayrat.info>
RE: Log a sample of transactions "Kuroda, Hayato" <kuroda.hayato@jp.fujitsu.com>
Re: Log a sample of transactions Adrien NAYRAT <adrien.nayrat@anayrat.info>
RE: Log a sample of transactions "Kuroda, Hayato" <kuroda.hayato@jp.fujitsu.com>
Re: Log a sample of transactions Adrien NAYRAT <adrien.nayrat@anayrat.info>
RE: Log a sample of transactions "Kuroda, Hayato" <kuroda.hayato@jp.fujitsu.com>
Re: Log a sample of transactions Adrien NAYRAT <adrien.nayrat@anayrat.info>
RE: Log a sample of transactions "Kuroda, Hayato" <kuroda.hayato@jp.fujitsu.com>
Re: Log a sample of transactions Adrien Nayrat <adrien.nayrat@anayrat.info>
Re: Log a sample of transactions Michael Paquier <michael@paquier.xyz>
Re: Log a sample of transactions Adrien NAYRAT <adrien.nayrat@anayrat.info>
Re: Log a sample of transactions Michael Paquier <michael@paquier.xyz>
Re: Log a sample of transactions Andres Freund <andres@anarazel.de>
Re: Log a sample of transactions Adrien NAYRAT <adrien.nayrat@anayrat.info>
Re: Log a sample of transactions Adrien NAYRAT <adrien.nayrat@anayrat.info>
Re: Re: Log a sample of transactions David Steele <david@pgmasters.net>
RE: Re: Log a sample of transactions "Kuroda, Hayato" <kuroda.hayato@jp.fujitsu.com>
Re: Log a sample of transactions Adrien NAYRAT <adrien.nayrat@anayrat.info>
RE: Log a sample of transactions "Kuroda, Hayato" <kuroda.hayato@jp.fujitsu.com>
Re: Log a sample of transactions Adrien NAYRAT <adrien.nayrat@anayrat.info>
Re: Log a sample of transactions Alvaro Herrera <alvherre@2ndquadrant.com>
Re: Log a sample of transactions Adrien NAYRAT <adrien.nayrat@anayrat.info>
Re: Log a sample of transactions Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: Log a sample of transactions Adrien Mobile <adrien.nayrat@anayrat.info>
Re: Log a sample of transactions Masahiko Sawada <sawada.mshk@gmail.com>
Re: Log a sample of transactions Adrien NAYRAT <adrien.nayrat@anayrat.info>
Re: Log a sample of transactions Michael Paquier <michael@paquier.xyz>
Re: Log a sample of transactions Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: Log a sample of transactions Adrien NAYRAT <adrien.nayrat@anayrat.info>
Re: Log a sample of transactions Robert Haas <robertmhaas@gmail.com>
Re: Log a sample of transactions Masahiko Sawada <sawada.mshk@gmail.com>
Re: Log a sample of transactions Adrien NAYRAT <adrien.nayrat@anayrat.info>
Dear Adrien,

>> * xact_is_sampled is left at the end of a transaction.
>> Should the parameter be set to false at the lowest layer of the transaction system?
>> I understand it is unnecessary for the functionality, but it have more symmetry.
>
> Yes, it is not necessary. I wonder what is more important : keep some 
>kind of symmetry or avoid unnecessary code (which can be source of mistake)?

>> 
>> * check_log_duration should be used only when postgres check the duration.
>> But I'm not sure a new function such as check_is_sampled is needed because A processing in new function will be as almost same as check_log_duration.

> I agree, I asked myself the same question and I preferred to keep code 
simple.

I think your point is also correct.
You should inquire superior reviewers or committers because I cannot judge which one is better.


BTW, I give you a suggestion about a test.
This parameter enables users to log statements randomly, hence adding some tests is very difficult.
Perhaps Only three cases are available:

* When log_transaction_sample_rate is set to 1, all statements are logged.
* When the parameter is set to 0, they are never logged.
* When the parameter change to 0 inside the transaction, logging is immediately stopped.


Best Regards,
Hayato Kuroda
Fujitsu LIMITED

В списке pgsql-hackers по дате отправления
От: Imai, Yoshikazu
Дата:
От: Kyotaro HORIGUCHI
Дата:
Сообщение: Re: Use an enum for RELKIND_*?
FAQ