On Fri, Feb 05, 2021 at 11:17:48AM +0900, Michael Paquier wrote: > Let's copy this data in index_concurrently_swap() instead. The > attached patch does that, and adds a test cheaper than what was > proposed. There is a minor release planned for next week, so I may be
> +++ b/src/test/regress/sql/create_index.sql > @@ -1103,6 +1104,13 @@ SELECT starelid::regclass, count(*) FROM pg_statistic > WHERE starelid IN ( > 'concur_exprs_index_pred'::regclass, > 'concur_exprs_index_pred_2'::regclass) > GROUP BY starelid ORDER BY starelid::regclass::text; > +-- attstattarget should remain intact > +SELECT attrelid::regclass, attnum, attstattarget > + FROM pg_attribute WHERE attrelid IN ( > + 'concur_exprs_index_expr'::regclass, > + 'concur_exprs_index_pred'::regclass, > + 'concur_exprs_index_pred_2'::regclass) > + ORDER BY 'concur_exprs_index_expr'::regclass::text, attnum; If I'm not wrong, you meant to ORDER BY attrelid::regclass::text, attnum; -- Justin