Re: About to add WAL write/fsync statistics to pg_stat_wal view

Поиск
Список
Период
Сортировка
От Masahiro Ikeda
Тема Re: About to add WAL write/fsync statistics to pg_stat_wal view
Дата
Msg-id afeef2fecff653f2e29d1dc5056c08a3@oss.nttdata.com
обсуждение исходный текст
Ответ на Re: About to add WAL write/fsync statistics to pg_stat_wal view  (Masahiko Sawada <sawada.mshk@gmail.com>)
Ответы Re: About to add WAL write/fsync statistics to pg_stat_wal view  (Masahiko Sawada <sawada.mshk@gmail.com>)
Список pgsql-hackers
Hi, thanks for the reviews.

I updated the attached patch.
The summary of the changes is following.

1. fix document

I followed another view's comments.


2. refactor issue_xlog_fsync()

I removed "sync_called" variables, narrowed the "duration" scope and
change the switch statement to if statement.


3. make wal-receiver report WAL statistics

I add the code to collect the statistics for a written operation
in XLogWalRcvWrite() and to report stats in WalReceiverMain().

Since WalReceiverMain() can loop fast, to avoid loading stats collector,
I add "force" argument to the pgstat_send_wal function. If "force" is
false, it can skip reporting until at least 500 msec since it last 
reported. WalReceiverMain() almost calls pgstat_send_wal() with "force" 
as false.

Regards,
-- 
Masahiro Ikeda
NTT DATA CORPORATION
Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Fujii Masao
Дата:
Сообщение: Re: [PATCH] postgres_fdw connection caching - cause remote sessions linger till the local session exit
Следующее
От: Greg Nancarrow
Дата:
Сообщение: Re: Parallel INSERT (INTO ... SELECT ...)