forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commite3cb1a5
committed
Report stats when replaying XLOG_RUNNING_XACTS
Previously stats in the startup process would only get reported duringshutdown of the startup process. It has been that way for a long time, butbecame a lot more noticeable with the new pg_stat_io view, which separates outIO done by different backend types...While replaying after every XLOG_RUNNING_XACTS isn't the prettiest approach,it has the advantage of being quite easy. Given that we're well past featurefreeze...It's not a problem that we don't report stats more frequently withwal_level=minimal, in that case stats can't be read before the stats processhas shut down.Besides the above, this commit also changes pgstat_report_stat() to acquirethe timestamp with GetCurrentTimestamp() instead ofGetCurrentTransactionStopTimestamp().Thanks to Melih Mutlu, Kyotaro Horiguchi for prototypes of other approaches tosolving this issue.Reported-by: Fujii Masao <masao.fujii@oss.nttdata.com>Discussion:https://postgr.es/m/5315aedc-fbca-1556-c5de-dc2e00b23a14@oss.nttdata.com1 parent7398e27 commite3cb1a5
2 files changed
+23
-3
lines changedLines changed: 9 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1193 | 1193 |
| |
1194 | 1194 |
| |
1195 | 1195 |
| |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
1196 | 1205 |
| |
1197 | 1206 |
| |
1198 | 1207 |
| |
|
Lines changed: 14 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
615 | 615 |
| |
616 | 616 |
| |
617 | 617 |
| |
618 |
| - | |
619 |
| - | |
620 |
| - | |
| 618 | + | |
621 | 619 |
| |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
622 | 633 |
| |
623 | 634 |
| |
624 | 635 |
| |
|
0 commit comments
Comments
(0)