From: | Justin Pryzby <pryzby(at)telsasoft(dot)com> |
---|---|
To: | Michael Paquier <michael(at)paquier(dot)xyz> |
Cc: | Ronan Dunklau <ronan(at)dunklau(dot)fr>, Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Preserve attstattarget on REINDEX CONCURRENTLY |
Date: | 2021-02-10 06:58:05 |
Message-ID: | 20210210065805.GG20012@telsasoft.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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
From | Date | Subject | |
---|---|---|---|
Next Message | tsunakawa.takay@fujitsu.com | 2021-02-10 06:59:59 | RE: Parallel INSERT (INTO ... SELECT ...) |
Previous Message | Bharath Rupireddy | 2021-02-10 06:43:08 | Re: Improvements and additions to COPY progress reporting |