forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitef6f30f
committed
Fix REINDEX CONCURRENTLY of partitions
In case of a partition index, when swapping the old and new index, wealso need to attach the new index as a partition and detach the oldone. Also, to handle partition indexes, we not only need to changedependencies referencing the index, but also dependencies of the indexreferencing something else. The previous code did this onlyspecifically for a constraint, but we also need to do this forpartitioned indexes. So instead write a generic function that does itfor all dependencies.Author: Michael Paquier <michael@paquier.xyz>Author: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>Discussion:https://www.postgresql.org/message-id/flat/DF4PR8401MB11964EDB77C860078C343BEBEE5A0%40DF4PR8401MB1196.NAMPRD84.PROD.OUTLOOK.COM#154df1fedb735190a773481765f7b8741 parentf7feb02 commitef6f30f
File tree
5 files changed
+209
-18
lines changed- src
- backend/catalog
- include/catalog
- test/regress
- expected
- sql
5 files changed
+209
-18
lines changedLines changed: 22 additions & 18 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
39 | 39 |
| |
40 | 40 |
| |
41 | 41 |
| |
| 42 | + | |
42 | 43 |
| |
43 | 44 |
| |
44 | 45 |
| |
| |||
1263 | 1264 |
| |
1264 | 1265 |
| |
1265 | 1266 |
| |
1266 |
| - | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
1267 | 1274 |
| |
1268 | 1275 |
| |
1269 | 1276 |
| |
| |||
1395 | 1402 |
| |
1396 | 1403 |
| |
1397 | 1404 |
| |
| 1405 | + | |
| 1406 | + | |
| 1407 | + | |
1398 | 1408 |
| |
1399 | 1409 |
| |
1400 | 1410 |
| |
| |||
1555 | 1565 |
| |
1556 | 1566 |
| |
1557 | 1567 |
| |
1558 |
| - | |
| 1568 | + | |
1559 | 1569 |
| |
1560 |
| - | |
1561 |
| - | |
| 1570 | + | |
1562 | 1571 |
| |
1563 |
| - | |
1564 |
| - | |
1565 |
| - | |
1566 |
| - | |
1567 |
| - | |
1568 |
| - | |
| 1572 | + | |
| 1573 | + | |
1569 | 1574 |
| |
1570 |
| - | |
1571 |
| - | |
1572 |
| - | |
| 1575 | + | |
| 1576 | + | |
1573 | 1577 |
| |
1574 |
| - | |
1575 |
| - | |
1576 |
| - | |
1577 |
| - | |
1578 |
| - | |
| 1578 | + | |
1579 | 1579 |
| |
1580 | 1580 |
| |
| 1581 | + | |
| 1582 | + | |
| 1583 | + | |
| 1584 | + | |
1581 | 1585 |
| |
1582 | 1586 |
| |
1583 | 1587 |
| |
|
Lines changed: 56 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
395 | 395 |
| |
396 | 396 |
| |
397 | 397 |
| |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
398 | 454 |
| |
399 | 455 |
| |
400 | 456 |
| |
|
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
199 | 199 |
| |
200 | 200 |
| |
201 | 201 |
| |
| 202 | + | |
| 203 | + | |
| 204 | + | |
202 | 205 |
| |
203 | 206 |
| |
204 | 207 |
| |
|
Lines changed: 85 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2001 | 2001 |
| |
2002 | 2002 |
| |
2003 | 2003 |
| |
| 2004 | + | |
| 2005 | + | |
| 2006 | + | |
| 2007 | + | |
| 2008 | + | |
| 2009 | + | |
| 2010 | + | |
| 2011 | + | |
| 2012 | + | |
| 2013 | + | |
| 2014 | + | |
| 2015 | + | |
| 2016 | + | |
| 2017 | + | |
| 2018 | + | |
| 2019 | + | |
| 2020 | + | |
| 2021 | + | |
| 2022 | + | |
| 2023 | + | |
| 2024 | + | |
| 2025 | + | |
| 2026 | + | |
| 2027 | + | |
| 2028 | + | |
| 2029 | + | |
| 2030 | + | |
| 2031 | + | |
| 2032 | + | |
| 2033 | + | |
| 2034 | + | |
| 2035 | + | |
| 2036 | + | |
| 2037 | + | |
| 2038 | + | |
| 2039 | + | |
| 2040 | + | |
| 2041 | + | |
| 2042 | + | |
| 2043 | + | |
| 2044 | + | |
| 2045 | + | |
| 2046 | + | |
| 2047 | + | |
| 2048 | + | |
| 2049 | + | |
| 2050 | + | |
| 2051 | + | |
| 2052 | + | |
| 2053 | + | |
| 2054 | + | |
| 2055 | + | |
| 2056 | + | |
| 2057 | + | |
| 2058 | + | |
| 2059 | + | |
| 2060 | + | |
| 2061 | + | |
| 2062 | + | |
| 2063 | + | |
| 2064 | + | |
| 2065 | + | |
| 2066 | + | |
| 2067 | + | |
| 2068 | + | |
| 2069 | + | |
| 2070 | + | |
| 2071 | + | |
| 2072 | + | |
| 2073 | + | |
| 2074 | + | |
| 2075 | + | |
| 2076 | + | |
| 2077 | + | |
| 2078 | + | |
| 2079 | + | |
| 2080 | + | |
| 2081 | + | |
| 2082 | + | |
| 2083 | + | |
| 2084 | + | |
| 2085 | + | |
| 2086 | + | |
| 2087 | + | |
| 2088 | + | |
2004 | 2089 |
| |
2005 | 2090 |
| |
2006 | 2091 |
| |
|
Lines changed: 43 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
789 | 789 |
| |
790 | 790 |
| |
791 | 791 |
| |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
792 | 835 |
| |
793 | 836 |
| |
794 | 837 |
| |
|
0 commit comments
Comments
(0)