forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitd18e756
committed
Remove CheckpointLock.
Up until now, we've held this lock when performing a checkpoint orrestartpoint, but commit076a055 backin 2004 and commit7e48b77 from 2009,taken together, have removed all need for this. In the present code,there's only ever one process entitled to attempt a checkpoint: eitherthe checkpointer, during normal operation, or the postmaster, duringsingle-user operation. So, we don't need the lock.One possible concern in making this change is that it means thata substantial amount of code where HOLD_INTERRUPTS() was previouslyin effect due to the preceding LWLockAcquire() will now berunning without that. This could mean that ProcessInterrupts()gets called in places from which it didn't before. However, thisseems unlikely to do very much, because the checkpointer doesn'thave any signal mapped to die(), so it's not clear how,for example, ProcDiePending = true could happen in the firstplace. Similarly with ClientConnectionLost and recovery conflicts.Also, if there are any such problems, we might want to fix themrather than reverting this, since running lots of code withinterrupt handling suspended is generally bad.Patch by me, per an inquiry by Amul Sul. Review by Tom Laneand Michael Paquier.Discussion:http://postgr.es/m/CAAJ_b97XnBBfYeSREDJorFsyoD1sHgqnNuCi=02mNQBUMnA=FA@mail.gmail.com1 parent951862e commitd18e756
File tree
5 files changed
+6
-36
lines changed- doc/src/sgml
- src/backend
- access
- heap
- transam
- replication/logical
- storage/lmgr
5 files changed
+6
-36
lines changedLines changed: 0 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1880 | 1880 |
| |
1881 | 1881 |
| |
1882 | 1882 |
| |
1883 |
| - | |
1884 |
| - | |
1885 |
| - | |
1886 |
| - | |
1887 | 1883 |
| |
1888 | 1884 |
| |
1889 | 1885 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1256 | 1256 |
| |
1257 | 1257 |
| |
1258 | 1258 |
| |
1259 |
| - | |
1260 |
| - | |
| 1259 | + | |
| 1260 | + | |
1261 | 1261 |
| |
1262 | 1262 |
| |
1263 | 1263 |
| |
|
Lines changed: 1 addition & 27 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
430 | 430 |
| |
431 | 431 |
| |
432 | 432 |
| |
433 |
| - | |
434 |
| - | |
435 |
| - | |
436 |
| - | |
437 | 433 |
| |
438 | 434 |
| |
439 | 435 |
| |
| |||
8864 | 8860 |
| |
8865 | 8861 |
| |
8866 | 8862 |
| |
8867 |
| - | |
8868 |
| - | |
8869 |
| - | |
8870 |
| - | |
8871 |
| - | |
8872 |
| - | |
8873 |
| - | |
8874 |
| - | |
8875 | 8863 |
| |
8876 | 8864 |
| |
8877 | 8865 |
| |
| |||
8941 | 8929 |
| |
8942 | 8930 |
| |
8943 | 8931 |
| |
8944 |
| - | |
8945 | 8932 |
| |
8946 | 8933 |
| |
8947 | 8934 |
| |
| |||
9241 | 9228 |
| |
9242 | 9229 |
| |
9243 | 9230 |
| |
9244 |
| - | |
9245 |
| - | |
9246 | 9231 |
| |
9247 | 9232 |
| |
9248 | 9233 |
| |
9249 | 9234 |
| |
9250 | 9235 |
| |
9251 |
| - | |
9252 |
| - | |
| 9236 | + | |
9253 | 9237 |
| |
9254 | 9238 |
| |
9255 | 9239 |
| |
| |||
9399 | 9383 |
| |
9400 | 9384 |
| |
9401 | 9385 |
| |
9402 |
| - | |
9403 |
| - | |
9404 |
| - | |
9405 |
| - | |
9406 |
| - | |
9407 |
| - | |
9408 | 9386 |
| |
9409 | 9387 |
| |
9410 | 9388 |
| |
| |||
9420 | 9398 |
| |
9421 | 9399 |
| |
9422 | 9400 |
| |
9423 |
| - | |
9424 | 9401 |
| |
9425 | 9402 |
| |
9426 | 9403 |
| |
| |||
9455 | 9432 |
| |
9456 | 9433 |
| |
9457 | 9434 |
| |
9458 |
| - | |
9459 | 9435 |
| |
9460 | 9436 |
| |
9461 | 9437 |
| |
| |||
9621 | 9597 |
| |
9622 | 9598 |
| |
9623 | 9599 |
| |
9624 |
| - | |
9625 |
| - | |
9626 | 9600 |
| |
9627 | 9601 |
| |
9628 | 9602 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
559 | 559 |
| |
560 | 560 |
| |
561 | 561 |
| |
562 |
| - | |
563 |
| - | |
| 562 | + | |
| 563 | + | |
564 | 564 |
| |
565 | 565 |
| |
566 | 566 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
15 | 15 |
| |
16 | 16 |
| |
17 | 17 |
| |
18 |
| - | |
| 18 | + | |
19 | 19 |
| |
20 | 20 |
| |
21 | 21 |
| |
|
0 commit comments
Comments
(0)