forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit5e6368b
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 parenta56e7b6 commit5e6368b
File tree
4 files changed
+15
-1
lines changed- doc/src/sgml
- src
- backend
- postmaster
- utils/activity
- include/utils
4 files changed
+15
-1
lines changedLines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2235 | 2235 |
| |
2236 | 2236 |
| |
2237 | 2237 |
| |
| 2238 | + | |
| 2239 | + | |
| 2240 | + | |
| 2241 | + | |
2238 | 2242 |
| |
2239 | 2243 |
| |
2240 | 2244 |
| |
|
Lines changed: 7 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
484 | 484 |
| |
485 | 485 |
| |
486 | 486 |
| |
| 487 | + | |
| 488 | + | |
| 489 | + | |
487 | 490 |
| |
488 | 491 |
| |
489 | 492 |
| |
| |||
726 | 729 |
| |
727 | 730 |
| |
728 | 731 |
| |
729 |
| - | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
730 | 736 |
| |
731 | 737 |
| |
732 | 738 |
| |
|
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
485 | 485 |
| |
486 | 486 |
| |
487 | 487 |
| |
| 488 | + | |
| 489 | + | |
| 490 | + | |
488 | 491 |
| |
489 | 492 |
| |
490 | 493 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
141 | 141 |
| |
142 | 142 |
| |
143 | 143 |
| |
| 144 | + | |
144 | 145 |
| |
145 | 146 |
| |
146 | 147 |
| |
|
0 commit comments
Comments
(0)