RE: Log a sample of transactions

From: "Kuroda, Hayato" <kuroda(dot)hayato(at)jp(dot)fujitsu(dot)com>
To: 'Adrien NAYRAT' <adrien(dot)nayrat(at)anayrat(dot)info>, "'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-01-23 02:12:15
Message-ID: 1F66B161998C704BABF8989B8A2AC0A316091C@G01JPEXMBYT05
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 almost same as check_log_duration.

Best Regards,
Hayato Kuroda
Fujitsu LIMITED

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2019-01-23 03:01:10 Re: Typo: llvm*.cpp files identified as llvm*.c
Previous Message Andres Freund 2019-01-23 01:49:46 Re: Typo: llvm*.cpp files identified as llvm*.c