- Notifications
You must be signed in to change notification settings - Fork5
Commitc00dc33
committed
Fix potential corruption of lock table in CREATE/DROP INDEX CONCURRENTLY.
If VirtualXactLock() has to wait for a transaction that holds its VXID lockas a fast-path lock, it must first convert the fast-path lock to a regularlock. It failed to take the required "partition" lock on the mainshared-memory lock table while doing so. This is the direct cause of theassert failure in GetLockStatusData() recently observed in the buildfarm,but more worryingly it could result in arbitrary corruption of the sharedlock table if some other process were concurrently engaged in modifying thesame partition of the lock table. Fortunately, VirtualXactLock() is onlyused by CREATE INDEX CONCURRENTLY and DROP INDEX CONCURRENTLY, so theopportunities for failure are fewer than they might have been.In passing, improve some comments and be a bit more consistent aboutorder of operations.1 parentf31d5ba commitc00dc33
1 file changed
+25
-4
lines changedLines changed: 25 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1017 | 1017 |
| |
1018 | 1018 |
| |
1019 | 1019 |
| |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
1020 | 1026 |
| |
1021 | 1027 |
| |
1022 | 1028 |
| |
| |||
2414 | 2420 |
| |
2415 | 2421 |
| |
2416 | 2422 |
| |
| 2423 | + | |
| 2424 | + | |
2417 | 2425 |
| |
2418 | 2426 |
| |
2419 | 2427 |
| |
| |||
2529 | 2537 |
| |
2530 | 2538 |
| |
2531 | 2539 |
| |
| 2540 | + | |
2532 | 2541 |
| |
2533 | 2542 |
| |
2534 | 2543 |
| |
| |||
3422 | 3431 |
| |
3423 | 3432 |
| |
3424 | 3433 |
| |
3425 |
| - | |
3426 |
| - | |
3427 |
| - | |
3428 | 3434 |
| |
3429 | 3435 |
| |
3430 | 3436 |
| |
| |||
3434 | 3440 |
| |
3435 | 3441 |
| |
3436 | 3442 |
| |
| 3443 | + | |
| 3444 | + | |
| 3445 | + | |
3437 | 3446 |
| |
3438 | 3447 |
| |
3439 | 3448 |
| |
| |||
3978 | 3987 |
| |
3979 | 3988 |
| |
3980 | 3989 |
| |
3981 |
| - | |
| 3990 | + | |
| 3991 | + | |
3982 | 3992 |
| |
3983 | 3993 |
| |
3984 | 3994 |
| |
3985 | 3995 |
| |
3986 | 3996 |
| |
| 3997 | + | |
3987 | 3998 |
| |
3988 | 3999 |
| |
| 4000 | + | |
| 4001 | + | |
| 4002 | + | |
| 4003 | + | |
3989 | 4004 |
| |
3990 | 4005 |
| |
3991 | 4006 |
| |
| 4007 | + | |
| 4008 | + | |
3992 | 4009 |
| |
3993 | 4010 |
| |
3994 | 4011 |
| |
3995 | 4012 |
| |
| 4013 | + | |
3996 | 4014 |
| |
| 4015 | + | |
| 4016 | + | |
| 4017 | + | |
3997 | 4018 |
| |
3998 | 4019 |
| |
3999 | 4020 |
| |
|
0 commit comments
Comments
(0)