forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitbd12080
committed
Preserve pg_attribute.attstattarget across REINDEX CONCURRENTLY
For an index, attstattarget can be updated using ALTER INDEX SETSTATISTICS. This data was lost on the new index after REINDEXCONCURRENTLY.The update of this field is done when the old and new indexes areswapped to make the fix back-patchable. Another approach we could lookafter in the long-term is to change index_create() to pass the wantedvalues of attstattarget when creating the new relation, but, as thiswould cause an ABI breakage this can be done only on HEAD.Reported-by: Ronan DunklauAuthor: Michael PaquierReviewed-by: Ronan Dunklau, Tomas VondraDiscussion:https://postgr.es/m/16628084.uLZWGnKmhe@laptop-ronandBackpatch-through: 121 parentcd142e0 commitbd12080
File tree
5 files changed
+107
-0
lines changed- src
- backend
- catalog
- utils/cache
- include/utils
- test/regress
- expected
- sql
5 files changed
+107
-0
lines changedLines changed: 56 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1884 | 1884 |
| |
1885 | 1885 |
| |
1886 | 1886 |
| |
| 1887 | + | |
| 1888 | + | |
| 1889 | + | |
| 1890 | + | |
| 1891 | + | |
| 1892 | + | |
| 1893 | + | |
| 1894 | + | |
| 1895 | + | |
| 1896 | + | |
| 1897 | + | |
| 1898 | + | |
| 1899 | + | |
| 1900 | + | |
| 1901 | + | |
| 1902 | + | |
| 1903 | + | |
| 1904 | + | |
| 1905 | + | |
| 1906 | + | |
| 1907 | + | |
| 1908 | + | |
| 1909 | + | |
| 1910 | + | |
| 1911 | + | |
| 1912 | + | |
| 1913 | + | |
| 1914 | + | |
| 1915 | + | |
| 1916 | + | |
| 1917 | + | |
| 1918 | + | |
| 1919 | + | |
| 1920 | + | |
| 1921 | + | |
| 1922 | + | |
| 1923 | + | |
| 1924 | + | |
| 1925 | + | |
| 1926 | + | |
| 1927 | + | |
| 1928 | + | |
| 1929 | + | |
| 1930 | + | |
| 1931 | + | |
| 1932 | + | |
| 1933 | + | |
| 1934 | + | |
| 1935 | + | |
| 1936 | + | |
| 1937 | + | |
| 1938 | + | |
| 1939 | + | |
| 1940 | + | |
| 1941 | + | |
| 1942 | + | |
1887 | 1943 |
| |
1888 | 1944 |
| |
1889 | 1945 |
| |
|
Lines changed: 27 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
871 | 871 |
| |
872 | 872 |
| |
873 | 873 |
| |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
874 | 901 |
| |
875 | 902 |
| |
876 | 903 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
90 | 90 |
| |
91 | 91 |
| |
92 | 92 |
| |
| 93 | + | |
93 | 94 |
| |
94 | 95 |
| |
95 | 96 |
| |
|
Lines changed: 15 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2559 | 2559 |
| |
2560 | 2560 |
| |
2561 | 2561 |
| |
| 2562 | + | |
2562 | 2563 |
| |
2563 | 2564 |
| |
2564 | 2565 |
| |
| |||
2638 | 2639 |
| |
2639 | 2640 |
| |
2640 | 2641 |
| |
| 2642 | + | |
| 2643 | + | |
| 2644 | + | |
| 2645 | + | |
| 2646 | + | |
| 2647 | + | |
| 2648 | + | |
| 2649 | + | |
| 2650 | + | |
| 2651 | + | |
| 2652 | + | |
| 2653 | + | |
| 2654 | + | |
| 2655 | + | |
2641 | 2656 |
| |
2642 | 2657 |
| |
2643 | 2658 |
| |
|
Lines changed: 8 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1079 | 1079 |
| |
1080 | 1080 |
| |
1081 | 1081 |
| |
| 1082 | + | |
1082 | 1083 |
| |
1083 | 1084 |
| |
1084 | 1085 |
| |
| |||
1103 | 1104 |
| |
1104 | 1105 |
| |
1105 | 1106 |
| |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
1106 | 1114 |
| |
1107 | 1115 |
| |
1108 | 1116 |
| |
|
0 commit comments
Comments
(0)