Re: Log a sample of transactions

From: Adrien NAYRAT <adrien(dot)nayrat(at)anayrat(dot)info>
To: Christoph Berg <myon(at)debian(dot)org>
Cc: "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 12:14:39
Message-ID: 181b82dd-b266-b498-149b-9bed6a3c083c@anayrat.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 3/28/19 10:45 AM, Christoph Berg wrote:
> Re: Adrien NAYRAT 2019-03-28 <c86d676a-0b1e-f9be-3da2-63fa15070db0(at)anayrat(dot)info>
>>>>> 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.
>
>> +#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.0 never logs.
>
> This still looks weird to me. If the default is to never log, and
> that's 0.0 as per the comment, the setting should be 0.0 as well.

Right, fixed in patch attached

>
>
> The same applies to log_statement_sample_rate which is already
> committed, were it looks even worse:

Yes, I fixed in this patch, but, as it is not related to this patch, it
should be fixed in another patch.

>
> #log_statement_sample_rate = 1 # Fraction of logged statements over
> # log_min_duration_statement. 1.0 logs all statements,
> # 0 never logs.
>
> Is "over" even correct English? ("out of" "from"?)
>

I have no idea on it, I am not an English native speaker.

Thanks,

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2019-03-28 12:15:51 Re: COPY FROM WHEN condition
Previous Message Michael Paquier 2019-03-28 12:14:11 Re: Misleading errors with column references in default expressions and partition bounds