You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Avoid copying index tuples when building an index.
The previous code, perhaps out of concern for avoid memory leaks, formedthe tuple in one memory context and then copied it to another memorycontext. However, this doesn't appear to be necessary, sinceindex_form_tuple and the functions it calls take precautions againstleaking memory. In my testing, building the tuple directly inside thesort context shaves several percent off the index build time.Rearrange things so we do that.Patch by me. Review by Amit Kapila, Tom Lane, Andres Freund.