- Notifications
You must be signed in to change notification settings - Fork5k
Commitf4694e0
committed
Fix some gaps in pg_stat_io with WAL receiver and WAL summarizer
The WAL receiver and WAL summarizer processes gain each one a call topgstat_report_wal(), to make sure that they report their WAL statisticsto pgstats, gathering data for pg_stat_io.In the WAL receiver, the stats reports are timed with status updates sentto the primary, that depend on wal_receiver_status_interval andwal_receiver_timeout. This is a conservative choice, but perhaps wecould be more aggressive with the frequency of the stats reports. Aninteresting historical fact is that the WAL receiver does writes andsyncs of WAL, but it has never reported its statistics to pgstats inpg_stat_wal.In the WAL summarizer, the stats reports are done each time the processwaits for WAL.While on it, pg_stat_io is adjusted so as these two processes do notreport any rows when IOObject is not WAL, making the view easier to usewith less rows.Two tests are added in TAP, checking statistics for the WAL summarizerand the WAL receiver. Status updates in the WAL receiver are currentlypossible in the recovery test 001_stream_rep.pl.Reviewed-by: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>Discussion:https://postgr.es/m/Z8UKZyVSHUUQJHNb@paquier.xyz1 parent54d2360 commitf4694e0
File tree
5 files changed
+39
-1
lines changed- src
- backend
- postmaster
- replication
- utils/activity
- bin/pg_walsummary/t
- test/recovery/t
5 files changed
+39
-1
lines changedLines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
33 | 33 |
| |
34 | 34 |
| |
35 | 35 |
| |
| 36 | + | |
36 | 37 |
| |
37 | 38 |
| |
38 | 39 |
| |
| |||
1636 | 1637 |
| |
1637 | 1638 |
| |
1638 | 1639 |
| |
| 1640 | + | |
| 1641 | + | |
| 1642 | + | |
1639 | 1643 |
| |
1640 | 1644 |
| |
1641 | 1645 |
| |
|
Lines changed: 10 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
583 | 583 |
| |
584 | 584 |
| |
585 | 585 |
| |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
586 | 596 |
| |
587 | 597 |
| |
588 | 598 |
| |
|
Lines changed: 11 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
435 | 435 |
| |
436 | 436 |
| |
437 | 437 |
| |
438 |
| - | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
439 | 441 |
| |
440 | 442 |
| |
441 | 443 |
| |
442 | 444 |
| |
443 | 445 |
| |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
444 | 454 |
| |
445 | 455 |
| |
446 | 456 |
| |
|
Lines changed: 7 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
46 | 46 |
| |
47 | 47 |
| |
48 | 48 |
| |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
49 | 56 |
| |
50 | 57 |
| |
51 | 58 |
| |
|
Lines changed: 7 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
506 | 506 |
| |
507 | 507 |
| |
508 | 508 |
| |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
509 | 516 |
| |
510 | 517 |
| |
511 | 518 |
| |
|
0 commit comments
Comments
(0)