forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit78c0f85
committed
Wake up for latches in CheckpointWriteDelay().
The checkpointer shouldn't ignore its latch. Other backends may bewaiting for it to drain the request queue. Hopefully real systems don'thave a full queue often, but the condition is reached easily whenshared_buffers is small.This involves defining a new wait event, which will appear in thepg_stat_activity view often due to spread checkpoints.Back-patch only to 14. Even though the problem exists in earlierbranches too, it's hard to hit there. In 14 we stopped using signalhandlers for latches on Linux, *BSD and macOS, which were previouslyhiding this problem by interrupting the sleep (though not reliably, asthe signal could arrive before the sleep begins; precisely the problemlatches address).Reported-by: Andres Freund <andres@anarazel.de>Reviewed-by: Andres Freund <andres@anarazel.de>Discussion:https://postgr.es/m/20220226213942.nb7uvb2pamyu26dj%40alap3.anarazel.de1 parentd9f7ad5 commit78c0f85
File tree
4 files changed
+16
-2
lines changed- doc/src/sgml
- src
- backend
- postmaster
- utils/activity
- include/utils
4 files changed
+16
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2223 | 2223 | | |
2224 | 2224 | | |
2225 | 2225 | | |
| 2226 | + | |
| 2227 | + | |
| 2228 | + | |
| 2229 | + | |
2226 | 2230 | | |
2227 | 2231 | | |
2228 | 2232 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
490 | 490 | | |
491 | 491 | | |
492 | 492 | | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
493 | 496 | | |
494 | 497 | | |
495 | 498 | | |
| |||
732 | 735 | | |
733 | 736 | | |
734 | 737 | | |
735 | | - | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
736 | 742 | | |
737 | 743 | | |
738 | 744 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
473 | 473 | | |
474 | 474 | | |
475 | 475 | | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
476 | 479 | | |
477 | 480 | | |
478 | 481 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
143 | | - | |
| 143 | + | |
| 144 | + | |
144 | 145 | | |
145 | 146 | | |
146 | 147 | | |
| |||
0 commit comments
Comments
(0)