Re: Add important info about ANALYZE after create Functional Index - Mailing list pgsql-hackers

From Fabrízio de Royes Mello
Subject Re: Add important info about ANALYZE after create Functional Index
Date
Msg-id CAFcNs+pM5r+RrzksvLpG=rBRv4Lc==_6QrD4SQ0AfPq5t=EjTQ@mail.gmail.com
Whole thread Raw
In response to Re: Add important info about ANALYZE after create Functional Index  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Add important info about ANALYZE after create Functional Index  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers

On Fri, Oct 30, 2020 at 3:22 AM Michael Paquier <michael@paquier.xyz> wrote:
>
> And in spirit, it is possible to address this issue with the patch
> attached which copies the set of stats from the old to the new index.

Did some tests and everything went ok... some comments below!

> For a non-concurrent REINDEX, this does not happen because we keep the
> same base relation, while we replace completely the relation with a
> concurrent operation. 

Exactly!

> We have a RemoveStatistics() in heap.c, but I
> did not really see the point to invent a copy flavor for this
> particular case.  Perhaps others have an opinion on that?
>

Even if we won't use it now, IMHO it is more legible to separate this responsibility into its own CopyStatistics function as attached.

Regards,

--
   Fabrízio de Royes Mello
   PostgreSQL Developer at OnGres Inc. - https://ongres.com
Attachment

pgsql-hackers by date:

Previous
From: Euler Taveira
Date:
Subject: Re: Log message for GSS connection is missing once connection authorization is successful.
Next
From: Tom Lane
Date:
Subject: Re: Since '2001-09-09 01:46:40'::timestamp microseconds are lost when extracting epoch