Commit 70b9adb
committed
Ensure we have a snapshot when updating pg_index in index_drop().
I assumed that all index_drop() callers set an active snapshot
beforehand, but that is evidently not true. One counterexample is
autovacuum, which doesn't set an active snapshot when cleaning up
orphan temp indexes. To fix, unconditionally push an active
snapshot before updating pg_index in index_drop().
Oversight in commit b52adba.
Reported-by: Masahiko Sawada
Reviewed-by: Stepan Neretin, Masahiko Sawada
Discussion: https://postgr.es/m/CAD21AoBgF9etQrXbN9or_YHsmBRJHHNUEkhHp9rGK9CyQv5aTQ%40mail.gmail.com1 parent 11b7de4 commit 70b9adb
1 file changed
+3
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2336 | 2336 | | |
2337 | 2337 | | |
2338 | 2338 | | |
2339 | | - | |
2340 | | - | |
| 2339 | + | |
2341 | 2340 | | |
2342 | | - | |
2343 | | - | |
2344 | | - | |
2345 | | - | |
| 2341 | + | |
2346 | 2342 | | |
2347 | 2343 | | |
2348 | 2344 | | |
| |||
2361 | 2357 | | |
2362 | 2358 | | |
2363 | 2359 | | |
2364 | | - | |
2365 | | - | |
| 2360 | + | |
2366 | 2361 | | |
2367 | 2362 | | |
2368 | 2363 | | |
| |||
0 commit comments