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