forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitb52adba
committed
Ensure we have a snapshot when updating pg_index entries.
Creating, reindexing, and dropping an index concurrently couldentail accessing pg_index's TOAST table, which was recently addedin commitb52c4fc. These code paths start and commit their owntransactions, but they do not always set an active snapshot. Thisrightfully leads to assertion failures and ERRORs when trying toaccess pg_index's TOAST table, such as the following:ERROR: cannot fetch toast data without an active snapshotTo fix, push an active snapshot just before each section of codethat might require accessing pg_index's TOAST table, and pop itshortly afterwards.Reported-by: Alexander LakhinReviewed-by: Michael PaquierDiscussion:https://postgr.es/m/a97d7401-e7c9-f771-6a00-037379f0a8bb%40gmail.com1 parent9726653 commitb52adba
File tree
4 files changed
+76
-0
lines changed- src
- backend
- catalog
- commands
- test/regress
- expected
- sql
4 files changed
+76
-0
lines changedLines changed: 21 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2276 | 2276 |
| |
2277 | 2277 |
| |
2278 | 2278 |
| |
| 2279 | + | |
| 2280 | + | |
| 2281 | + | |
| 2282 | + | |
| 2283 | + | |
| 2284 | + | |
2279 | 2285 |
| |
2280 | 2286 |
| |
2281 | 2287 |
| |
| 2288 | + | |
| 2289 | + | |
2282 | 2290 |
| |
2283 | 2291 |
| |
2284 | 2292 |
| |
| |||
2326 | 2334 |
| |
2327 | 2335 |
| |
2328 | 2336 |
| |
| 2337 | + | |
| 2338 | + | |
| 2339 | + | |
| 2340 | + | |
| 2341 | + | |
| 2342 | + | |
| 2343 | + | |
| 2344 | + | |
| 2345 | + | |
| 2346 | + | |
2329 | 2347 |
| |
2330 | 2348 |
| |
2331 | 2349 |
| |
| |||
2343 | 2361 |
| |
2344 | 2362 |
| |
2345 | 2363 |
| |
| 2364 | + | |
| 2365 | + | |
| 2366 | + | |
2346 | 2367 |
| |
2347 | 2368 |
| |
2348 | 2369 |
| |
|
Lines changed: 24 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1798 | 1798 |
| |
1799 | 1799 |
| |
1800 | 1800 |
| |
| 1801 | + | |
| 1802 | + | |
| 1803 | + | |
| 1804 | + | |
| 1805 | + | |
| 1806 | + | |
1801 | 1807 |
| |
1802 | 1808 |
| |
1803 | 1809 |
| |
1804 | 1810 |
| |
1805 | 1811 |
| |
| 1812 | + | |
| 1813 | + | |
1806 | 1814 |
| |
1807 | 1815 |
| |
1808 | 1816 |
| |
| |||
4256 | 4264 |
| |
4257 | 4265 |
| |
4258 | 4266 |
| |
| 4267 | + | |
| 4268 | + | |
| 4269 | + | |
| 4270 | + | |
| 4271 | + | |
| 4272 | + | |
4259 | 4273 |
| |
4260 | 4274 |
| |
4261 | 4275 |
| |
4262 | 4276 |
| |
4263 | 4277 |
| |
4264 | 4278 |
| |
| 4279 | + | |
| 4280 | + | |
4265 | 4281 |
| |
4266 | 4282 |
| |
4267 | 4283 |
| |
| |||
4312 | 4328 |
| |
4313 | 4329 |
| |
4314 | 4330 |
| |
| 4331 | + | |
| 4332 | + | |
| 4333 | + | |
| 4334 | + | |
| 4335 | + | |
| 4336 | + | |
4315 | 4337 |
| |
| 4338 | + | |
| 4339 | + | |
4316 | 4340 |
| |
4317 | 4341 |
| |
4318 | 4342 |
| |
|
Lines changed: 15 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1640 | 1640 |
| |
1641 | 1641 |
| |
1642 | 1642 |
| |
| 1643 | + | |
| 1644 | + | |
| 1645 | + | |
| 1646 | + | |
| 1647 | + | |
| 1648 | + | |
| 1649 | + | |
| 1650 | + | |
| 1651 | + | |
| 1652 | + | |
| 1653 | + | |
| 1654 | + | |
| 1655 | + | |
| 1656 | + | |
| 1657 | + |
Lines changed: 16 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
919 | 919 |
| |
920 | 920 |
| |
921 | 921 |
| |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + |
0 commit comments
Comments
(0)