forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit33394ee
committed
Force to send remaining WAL stats to the stats collector at walwriter exit.
In walwriter's main loop, WAL stats message is only sent if enough timehas passed since last one was sent to reach PGSTAT_STAT_INTERVAL msecs.This is necessary to avoid overloading to the stats collector. But thiscan cause recent WAL stats to be unsent when walwriter exits.To ensure that all the WAL stats are sent, this commit makes walwriterforce to send remaining WAL stats to the collector when it exits becauseof shutdown request. Note that those remaining WAL stats can still beunsent when walwriter exits with non-zero exit code (e.g., FATAL error).This is OK because that walwriter exit leads to server crash andsubsequent recovery discards all the stats. So there is no need to sendremaining stats in that case.Author: Masahiro IkedaReviewed-by: Fujii MasaoDiscussion:https://postgr.es/m/0509ad67b585a5b86a83d445dfa75392@oss.nttdata.com1 parent43c6662 commit33394ee
1 file changed
+36
-1
lines changedLines changed: 36 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
78 | 78 |
| |
79 | 79 |
| |
80 | 80 |
| |
| 81 | + | |
| 82 | + | |
| 83 | + | |
81 | 84 |
| |
82 | 85 |
| |
83 | 86 |
| |
| |||
242 | 245 |
| |
243 | 246 |
| |
244 | 247 |
| |
245 |
| - | |
| 248 | + | |
| 249 | + | |
246 | 250 |
| |
247 | 251 |
| |
248 | 252 |
| |
| |||
272 | 276 |
| |
273 | 277 |
| |
274 | 278 |
| |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + |
0 commit comments
Comments
(0)