Re: Log a sample of transactions

From: Adrien NAYRAT <adrien(dot)nayrat(at)anayrat(dot)info>
To: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, "Kuroda, Hayato" <kuroda(dot)hayato(at)jp(dot)fujitsu(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Log a sample of transactions
Date: 2019-03-28 09:33:02
Message-ID: c86d676a-0b1e-f9be-3da2-63fa15070db0@anayrat.info
Views: Raw Message | Whole Thread | Download mbox
Thread:
Lists: pgsql-hackers

Hello,

On 3/28/19 3:18 AM, Masahiko Sawada wrote:
>>>
>>> Sorry, I changed that, someone suggest using either "0" and "1", or
>>> "0.0" and "1.0" but not mixing both.
>
> Agreed with using "0.0" and "1.0".
>
>>> I will remove this change.
>>>
>
> --- a/src/backend/utils/misc/postgresql.conf.sample
> +++ b/src/backend/utils/misc/postgresql.conf.sample
> +#log_transaction_sample_rate = 0 # Fraction of transactions
> whose statements
> + # are logged regardless of
> their duration. 1.0 logs all
> + # statements from all
> transactions, 0 never logs.
>
> --- a/src/backend/utils/misc/guc.c
> +++ b/src/backend/utils/misc/guc.c
> + {"log_transaction_sample_rate", PGC_SUSET, LOGGING_WHEN,
> + gettext_noop("Set the fraction of transactions
> to log for new transactions."),
> + gettext_noop("Logs all statements from a
> fraction of transactions. "
> + "Use a value between
> 0 (never log) and 1 (log all "
> + "statements for all
> transactions).")
>
> I think it would be better to use the same number in both guc.c and
> postgresql.conf.sample. How about unifying them to "0.0" and "1.0" for
> consistency?
>

I changed to use both 0.0 and 1.0.

Thanks!

Attachment Content-Type Size
log_xact-7.patch text/x-patch 6.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2019-03-28 09:33:23 Re: ToDo: show size of partitioned table
Previous Message David Rowley 2019-03-28 09:32:21 Re: Berserk Autovacuum (let's save next Mandrill)