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