Re: Log a sample of transactions
Adrien Nayrat <adrien.nayrat@anayrat.info>
From: Adrien NAYRAT <adrien.nayrat@anayrat.info>
To: "Kuroda, Hayato" <kuroda.hayato@jp.fujitsu.com>, "'pgsql-hackers@lists.postgresql.org'" <pgsql-hackers@lists.postgresql.org>
Date: 2019-01-26T10:44:58Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Tweak docs for log_statement_sample_rate
- d1f04b96b99d 12.0 landed
Attachments
- log_xact-4.patch (text/x-patch) patch
On 1/23/19 3:12 AM, Kuroda, Hayato wrote: > Dear Adrien, Hello Kuroda-san > > > ---- config.sgml ---- > You must document the behavior when users change the parameter during a transaction. > あやしい・・・ Agreed, I added a wording. > > ---- 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" Fixed > > * 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. Yes, it is not necessary. I wonder what is more important : keep some kind of symmetry or avoid unnecessary code (which can be source of mistake)? > > * 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. I agree, I asked myself the same question and I preferred to keep code simple. Here is 4th patch. Thanks!