- Notifications
You must be signed in to change notification settings - Fork5
Commitbf9a60e
committed
Fix interaction between CREATE INDEX and "snapshot too old".
Since indexes are created without valid LSNs, an index createdwhile a snapshot older than old_snapshot_threshold existed couldcause queries to return incorrect results when those old snapshotswere used, if any relevant rows had been subject to early pruningbefore the index was built. Prevent usage of a newly created indexuntil all such snapshots are released, for relations where this canhappen.Questions about the interaction of "snapshot too old" with indexcreation were initially raised by Andres Freund.Reviewed by Robert Haas.1 parentcae1c78 commitbf9a60e
4 files changed
+36
-13
lines changedLines changed: 21 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2040 | 2040 |
| |
2041 | 2041 |
| |
2042 | 2042 |
| |
2043 |
| - | |
| 2043 | + | |
| 2044 | + | |
| 2045 | + | |
| 2046 | + | |
| 2047 | + | |
| 2048 | + | |
2044 | 2049 |
| |
2045 | 2050 |
| |
2046 | 2051 |
| |
2047 | 2052 |
| |
2048 | 2053 |
| |
2049 | 2054 |
| |
2050 |
| - | |
| 2055 | + | |
| 2056 | + | |
2051 | 2057 |
| |
2052 | 2058 |
| |
2053 | 2059 |
| |
2054 |
| - | |
| 2060 | + | |
2055 | 2061 |
| |
2056 | 2062 |
| |
2057 | 2063 |
| |
| |||
2060 | 2066 |
| |
2061 | 2067 |
| |
2062 | 2068 |
| |
2063 |
| - | |
| 2069 | + | |
| 2070 | + | |
2064 | 2071 |
| |
2065 | 2072 |
| |
2066 | 2073 |
| |
| |||
3389 | 3396 |
| |
3390 | 3397 |
| |
3391 | 3398 |
| |
| 3399 | + | |
| 3400 | + | |
| 3401 | + | |
| 3402 | + | |
| 3403 | + | |
3392 | 3404 |
| |
3393 | 3405 |
| |
3394 | 3406 |
| |
3395 | 3407 |
| |
3396 | 3408 |
| |
3397 | 3409 |
| |
3398 | 3410 |
| |
| 3411 | + | |
3399 | 3412 |
| |
3400 | 3413 |
| |
3401 | 3414 |
| |
| |||
3409 | 3422 |
| |
3410 | 3423 |
| |
3411 | 3424 |
| |
3412 |
| - | |
| 3425 | + | |
| 3426 | + | |
3413 | 3427 |
| |
3414 |
| - | |
| 3428 | + | |
3415 | 3429 |
| |
3416 |
| - | |
| 3430 | + | |
3417 | 3431 |
| |
3418 | 3432 |
| |
3419 | 3433 |
| |
|
Lines changed: 1 addition & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4290 | 4290 |
| |
4291 | 4291 |
| |
4292 | 4292 |
| |
4293 |
| - | |
4294 |
| - | |
| 4293 | + | |
4295 | 4294 |
| |
4296 | 4295 |
| |
4297 | 4296 |
| |
|
Lines changed: 1 addition & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1596 | 1596 |
| |
1597 | 1597 |
| |
1598 | 1598 |
| |
1599 |
| - | |
1600 |
| - | |
1601 |
| - | |
1602 |
| - | |
| 1599 | + | |
1603 | 1600 |
| |
1604 | 1601 |
| |
1605 | 1602 |
| |
|
Lines changed: 13 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
31 | 31 |
| |
32 | 32 |
| |
33 | 33 |
| |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
34 | 47 |
| |
35 | 48 |
| |
36 | 49 |
| |
|
0 commit comments
Comments
(0)