- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit0bada39
committed
Fix inplace update buffer self-deadlock.
A CacheInvalidateHeapTuple* callee might callCatalogCacheInitializeCache(), which needs a relcache entry. Acquiringa valid relcache entry might scan pg_class. Hence, to preventundetected LWLock self-deadlock, CacheInvalidateHeapTuple* callers mustnot hold BUFFER_LOCK_EXCLUSIVE on buffers of pg_class. Move theCacheInvalidateHeapTupleInplace() before the BUFFER_LOCK_EXCLUSIVE. Noback-patch, since I've reverted commit243e9b4 from non-master branches.Reported by Alexander Lakhin. Reviewed by Alexander Lakhin.Discussion:https://postgr.es/m/10ec0bc3-5933-1189-6bb8-5dec4114558e@gmail.com1 parentb412f40 commit0bada39
3 files changed
+26
-8
lines changedLines changed: 13 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
6214 | 6214 |
| |
6215 | 6215 |
| |
6216 | 6216 |
| |
| 6217 | + | |
| 6218 | + | |
| 6219 | + | |
| 6220 | + | |
| 6221 | + | |
| 6222 | + | |
| 6223 | + | |
| 6224 | + | |
| 6225 | + | |
| 6226 | + | |
| 6227 | + | |
6217 | 6228 |
| |
6218 | 6229 |
| |
6219 | 6230 |
| |
| |||
6309 | 6320 |
| |
6310 | 6321 |
| |
6311 | 6322 |
| |
| 6323 | + | |
6312 | 6324 |
| |
6313 | 6325 |
| |
6314 | 6326 |
| |
| |||
6345 | 6357 |
| |
6346 | 6358 |
| |
6347 | 6359 |
| |
6348 |
| - | |
6349 |
| - | |
6350 |
| - | |
6351 |
| - | |
6352 |
| - | |
6353 |
| - | |
6354 |
| - | |
6355 |
| - | |
6356 | 6360 |
| |
6357 | 6361 |
| |
6358 | 6362 |
| |
| |||
6481 | 6485 |
| |
6482 | 6486 |
| |
6483 | 6487 |
| |
| 6488 | + | |
6484 | 6489 |
| |
6485 | 6490 |
| |
6486 | 6491 |
| |
|
Lines changed: 12 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1201 | 1201 |
| |
1202 | 1202 |
| |
1203 | 1203 |
| |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
1204 | 1216 |
| |
1205 | 1217 |
| |
1206 | 1218 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
30 | 30 |
| |
31 | 31 |
| |
32 | 32 |
| |
| 33 | + | |
33 | 34 |
| |
34 | 35 |
| |
35 | 36 |
| |
|
0 commit comments
Comments
(0)