Re: tuplesort Generation memory contexts don't play nicely with index builds - Mailing list pgsql-hackers

From David Rowley
Subject Re: tuplesort Generation memory contexts don't play nicely with index builds
Date
Msg-id CAApHDvq2iQ0WygUCacYfSWWsbXBUFwrjtqf1EV=VpnFQP1b7wA@mail.gmail.com
Whole thread Raw
In response to tuplesort Generation memory contexts don't play nicely with index builds  (David Rowley <dgrowleyml@gmail.com>)
List pgsql-hackers
On Wed, 29 Jun 2022 at 12:59, David Rowley <dgrowleyml@gmail.com> wrote:
> I noticed while doing some memory context related work that since we
> now use generation.c memory contexts for tuplesorts (40af10b57) that
> tuplesort_putindextuplevalues() causes memory "leaks" in the
> generation context due to index_form_tuple() being called while we're
> switched into the state->tuplecontext.

I've attached a draft patch which changes things so that we don't use
generation contexts for sorts being done for index builds.

David

Attachment

pgsql-hackers by date:

Previous
From: Nikolay Shaplov
Date:
Subject: Re: [PATCH] minor reloption regression tests improvement
Next
From: Fujii Masao
Date:
Subject: Add index item for MERGE.