RE: Log a sample of transactions - Mailing list pgsql-hackers

From Kuroda, Hayato
Subject RE: Log a sample of transactions
Date
Msg-id 1F66B161998C704BABF8989B8A2AC0A316091C@G01JPEXMBYT05
Whole thread Raw
In response to Re: Log a sample of transactions  (Adrien NAYRAT <adrien.nayrat@anayrat.info>)
Responses Re: Log a sample of transactions  (Adrien NAYRAT <adrien.nayrat@anayrat.info>)
List pgsql-hackers
Dear Adrien,

> Hum, I am not an english native speaker, I choosed "rate" because it is 
> already used for auto_explain.sample_rate and for log_statement_sample_rate

If the community agree those name, renaming parameters are not needed.
Consistency is the most important in a DBMS. :-)

I read your source code and I thought it is generally good.
Here are some minor suggestions, but you don't have to follow strictly:

---- config.sgml ----
You must document the behavior when users change the parameter during a transaction.
あやしい・・・
 
---- postgres.c ----
I give you three comments.

> /* flag for logging statements in this transaction */
I think "a" or the plural form should be used instead of "this"

* 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.

* 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
almostsame as check_log_duration.
 


Best Regards,
Hayato Kuroda
Fujitsu LIMITED

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Typo: llvm*.cpp files identified as llvm*.c
Next
From: Michael Paquier
Date:
Subject: Re: Typo: llvm*.cpp files identified as llvm*.c