Re: Log a sample of transactions
От | Adrien Nayrat |
---|---|
Тема | Re: Log a sample of transactions |
Дата | |
Msg-id | bb095cee-9fab-f814-1831-b6c06fbcf744@anayrat.info обсуждение исходный текст |
Ответ на | RE: Log a sample of transactions ("Kuroda, Hayato" <kuroda.hayato@jp.fujitsu.com>) |
Ответы |
Re: Log a sample of transactions
|
Список | pgsql-hackers |
On 1/28/19 2:53 AM, Kuroda, Hayato wrote: > BTW, I give you a suggestion about a test. > This parameter enables users to log statements randomly, hence adding some tests is very difficult. > Perhaps Only three cases are available: > > * When log_transaction_sample_rate is set to 1, all statements are logged. > * When the parameter is set to 0, they are never logged. > * When the parameter change to 0 inside the transaction, logging is immediately stopped. I agree we should add tests, my main problem is log output contains duration information: postgres=# select 1; LOG: duration: 0.539 ms statement: select 1; I did not find any test for log_min_duration that could help me. LCOV indicate there is no tests on this part (look check_log_duration()): https://coverage.postgresql.org/src/backend/tcop/postgres.c.gcov.html I will look how to test this properly with test infrastructure. Maybe a simple regex to remove duration part will be enough.
Вложения
В списке pgsql-hackers по дате отправления: