- Notifications
You must be signed in to change notification settings - Fork28
Commit1816a1c
Fix checkpoint signalling
Checkpointer uses its MyLatch to wake up when a checkpoint request isreceived. But before commitc655077 the latch was not used foranything else, so the code could just go to sleep after each loopwithout rechecking the sleeping condition. That commit added a separateResetLatch in its code path[1], which can cause a checkpoint to gounnoticed for potentially a long time.Fix by skipping sleep if any checkpoint flags are set. Also add a testto verify this; authored by Kyotaro Horiguchi.[1] CreateCheckPoint -> InvalidateObsoleteReplicationSlots ->ConditionVariableTimeSleepReport and diagnosis by Kyotaro Horiguchi.Co-authored-by: Kyotaro Horiguchi <horikyota.ntt@gmail.com>Co-authored-by: Álvaro Herrera <alvherre@alvh.no-ip.org>Discussion:https://postgr.es/m/20200408.141956.891237856186513376.horikyota.ntt@gmail.com1 parentfef819a commit1816a1c
File tree
2 files changed
+49
-2
lines changed- src
- backend/postmaster
- test/recovery/t
2 files changed
+49
-2
lines changedLines changed: 7 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
494 | 494 |
| |
495 | 495 |
| |
496 | 496 |
| |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
497 | 504 |
| |
498 | 505 |
| |
499 | 506 |
| |
|
Lines changed: 42 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
179 | 179 |
| |
180 | 180 |
| |
181 | 181 |
| |
182 |
| - | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
183 | 223 |
| |
184 | 224 |
| |
185 | 225 |
| |
|
0 commit comments
Comments
(0)