- Notifications
You must be signed in to change notification settings - Fork5k
Commit7f7f324
committed
Add more monitoring data for WAL writes in the WAL receiver
This commit adds two improvements related to the monitoring of WALwrites for the WAL receiver.First, write counts and timings are now counted in pg_stat_io for theWAL receiver. These have been discarded from pg_stat_wal inff99918 due to performance concerns, related to the fact that westill relied on an on-disk file for the stats back then, even withtrack_wal_io_timing to avoid the overhead of the timestamp calculations.This implementation is simpler than the original proposal as it ispossible to rely on the APIs of pgstat_io.c to do the job. Like thefsync and read data, track_wal_io_timing needs to be enabled to trackthe timings.Second, a wait event is added around the pg_pwrite() call in charge ofthe writes, using the exiting WAIT_EVENT_WAL_WRITE. This is useful asthe WAL receiver data is tracked in pg_stat_activity.Reviewed-by: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>Discussion:https://postgr.es/m/Z8gFnH4o3jBm5BRz@ip-10-97-1-34.eu-west-3.compute.internal1 parent393e0d2 commit7f7f324
1 file changed
+12
-0
lines changedLines changed: 12 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
922 | 922 |
| |
923 | 923 |
| |
924 | 924 |
| |
| 925 | + | |
925 | 926 |
| |
926 | 927 |
| |
927 | 928 |
| |
| |||
952 | 953 |
| |
953 | 954 |
| |
954 | 955 |
| |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
955 | 962 |
| |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
956 | 968 |
| |
957 | 969 |
| |
958 | 970 |
| |
|
0 commit comments
Comments
(0)