Re: Opclass parameters of indexes lost after REINDEX CONCURRENTLY[

2021-10-31 Thread Michael Paquier
On Sat, Oct 30, 2021 at 09:26:35PM +0900, Michael Paquier wrote: > Yeah, you are right that it would be better here to use > get_attoptions() to grab a copy of each attribute's option directly > from the catalogs. We also do that for predicates and expressions. While looking again at this one thi

Re: Opclass parameters of indexes lost after REINDEX CONCURRENTLY

2021-10-30 Thread Michael Paquier
On Sat, Oct 30, 2021 at 04:11:06AM -0700, Zhihong Yu wrote: > Should datumCopy() be used inside the loop ? I saw the following > in get_attoptions(Oid relid, int16 attnum): Yeah, you are right that it would be better here to use get_attoptions() to grab a copy of each attribute's option directly f

Re: Opclass parameters of indexes lost after REINDEX CONCURRENTLY

2021-10-30 Thread Zhihong Yu
On Sat, Oct 30, 2021 at 3:59 AM Zhihong Yu wrote: > > > On Sat, Oct 30, 2021 at 1:28 AM Michael Paquier > wrote: > >> Hi all, >> >> While reviewing the code for opclass parameters with indexes, I have >> noticed that opclass parameters are lost after a concurrent reindex. >> As we use a IndexInf

Re: Opclass parameters of indexes lost after REINDEX CONCURRENTLY

2021-10-30 Thread Zhihong Yu
On Sat, Oct 30, 2021 at 1:28 AM Michael Paquier wrote: > Hi all, > > While reviewing the code for opclass parameters with indexes, I have > noticed that opclass parameters are lost after a concurrent reindex. > As we use a IndexInfo to hold the information of the new index when > creating a copy