forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit073afae
Amit Kapila
Avoid possible deadlock while locking multiple heap pages.
To avoid deadlock, backend acquires a lock on heap pages in blocknumber order. In certain cases, lock on heap pages is dropped andreacquired. In this case, the locks are dropped for reading incorresponding VM page/s. The issue is we re-acquire locks in bufferIdorder whereas the intention was to acquire in blockid order.This commit ensures that we will always acquire locks on heap pages inblockid order.Reported-by: Nishant FnuAuthor: Nishant FnuReviewed-by: Amit Kapila and Robert HaasBackpatch-through: 9.4Discussion:https://postgr.es/m/5883C831-2ED1-47C8-BFAC-2D5BAE5A8CAE@amazon.com1 parent014763e commit073afae
1 file changed
+4
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
119 | | - | |
| 118 | + | |
| 119 | + | |
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
| 130 | + | |
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| |||
449 | 449 | | |
450 | 450 | | |
451 | 451 | | |
452 | | - | |
| 452 | + | |
453 | 453 | | |
454 | 454 | | |
455 | 455 | | |
| |||
0 commit comments
Comments
(0)