From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | Ronan Dunklau <ronan(at)dunklau(dot)fr> |
Cc: | 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-05 02:17:48 |
Message-ID: | YByqzE9qu16vuEB+@paquier.xyz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Feb 04, 2021 at 03:52:44PM +0100, Ronan Dunklau wrote:
>> Hmmm, that sure seems like a bug, or at least unexpected behavior (that
>> I don't see mentioned in the docs).
Yeah, per the rule of consistency, this classifies as a bug to me.
> Please find attached a correct patch.
ConstructTupleDescriptor() does not matter much, but this patch is not
acceptable to me as it touches the area of the index creation while
statistics on an index expression can only be changed with a special
flavor of ALTER INDEX with column numbers. This would imply an ABI
breakage, so it cannot be backpatched as-is.
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
better to wait after that so as we have enough time to agree on a
solution.
--
Michael
Attachment | Content-Type | Size |
---|---|---|
reindex-conc-attstattarget-v2.patch | text/x-diff | 6.6 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | sasa su | 2021-02-05 02:38:17 | SPI: process exit in SPI_exec when table not exist. error code not return. |
Previous Message | Ian Lawrence Barwick | 2021-02-05 01:55:04 | Re: POC: postgres_fdw insert batching |