Commit 508300e
committed
Improve and fix some error handling for REINDEX INDEX/TABLE CONCURRENTLY
This improves the user experience when it comes to restrict several
flavors of REINDEX CONCURRENTLY. First, for INDEX, remove a restriction
on shared relations as we already check after catalog relations. Then,
for TABLE, add a proper error message when attempting to run the command
on system catalogs. The code path of CREATE INDEX CONCURRENTLY already
complains about that, but if a REINDEX is issued then then the error
generated is confusing.
While on it, add more tests to check restrictions on catalog indexes and
on toast table/index for catalogs. Some error messages are improved,
with wording suggestion coming from Tom Lane.
Reported-by: Tom Lane
Author: Michael Paquier
Reviewed-by: Tom Lane
Discussion: https://postgr.es/m/23694.1556806002@sss.pgh.pa.us1 parent 24c19e9 commit 508300e
File tree
3 files changed
+27
-19
lines changed- src
- backend/commands
- test/regress
- expected
- sql
3 files changed
+27
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2743 | 2743 | | |
2744 | 2744 | | |
2745 | 2745 | | |
| 2746 | + | |
| 2747 | + | |
| 2748 | + | |
| 2749 | + | |
| 2750 | + | |
| 2751 | + | |
2746 | 2752 | | |
2747 | 2753 | | |
2748 | 2754 | | |
| |||
2756 | 2762 | | |
2757 | 2763 | | |
2758 | 2764 | | |
2759 | | - | |
| 2765 | + | |
2760 | 2766 | | |
2761 | 2767 | | |
2762 | 2768 | | |
2763 | 2769 | | |
2764 | 2770 | | |
2765 | | - | |
| 2771 | + | |
2766 | 2772 | | |
2767 | 2773 | | |
2768 | 2774 | | |
| |||
2802 | 2808 | | |
2803 | 2809 | | |
2804 | 2810 | | |
2805 | | - | |
| 2811 | + | |
2806 | 2812 | | |
2807 | 2813 | | |
2808 | 2814 | | |
| |||
2831 | 2837 | | |
2832 | 2838 | | |
2833 | 2839 | | |
2834 | | - | |
2835 | | - | |
2836 | | - | |
2837 | | - | |
2838 | | - | |
2839 | | - | |
2840 | 2840 | | |
2841 | 2841 | | |
2842 | 2842 | | |
2843 | 2843 | | |
2844 | | - | |
| 2844 | + | |
2845 | 2845 | | |
2846 | 2846 | | |
2847 | 2847 | | |
| |||
2869 | 2869 | | |
2870 | 2870 | | |
2871 | 2871 | | |
2872 | | - | |
| 2872 | + | |
2873 | 2873 | | |
2874 | 2874 | | |
2875 | 2875 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1967 | 1967 | | |
1968 | 1968 | | |
1969 | 1969 | | |
1970 | | - | |
| 1970 | + | |
1971 | 1971 | | |
1972 | 1972 | | |
1973 | 1973 | | |
| |||
2092 | 2092 | | |
2093 | 2093 | | |
2094 | 2094 | | |
2095 | | - | |
2096 | | - | |
2097 | | - | |
2098 | | - | |
| 2095 | + | |
| 2096 | + | |
| 2097 | + | |
| 2098 | + | |
| 2099 | + | |
| 2100 | + | |
| 2101 | + | |
| 2102 | + | |
| 2103 | + | |
2099 | 2104 | | |
2100 | 2105 | | |
2101 | 2106 | | |
| |||
2144 | 2149 | | |
2145 | 2150 | | |
2146 | 2151 | | |
2147 | | - | |
| 2152 | + | |
2148 | 2153 | | |
2149 | 2154 | | |
2150 | 2155 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
838 | 838 | | |
839 | 839 | | |
840 | 840 | | |
841 | | - | |
842 | | - | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
843 | 846 | | |
844 | 847 | | |
845 | 848 | | |
| |||
0 commit comments