Re: Adding REPACK [concurrently] - Mailing list pgsql-hackers

From Antonin Houska
Subject Re: Adding REPACK [concurrently]
Date
Msg-id 68571.1772737573@localhost
Whole thread Raw
In response to Re: Adding REPACK [concurrently]  (Antonin Houska <ah@cybertec.at>)
Responses Re: Adding REPACK [concurrently]
List pgsql-hackers
Antonin Houska <ah@cybertec.at> wrote:

> Antonin Houska <ah@cybertec.at> wrote:
> 
> > Mihail Nikalayeu <mihailnikalayeu@gmail.com> wrote:
> > > ------------
> > > 
> > > > attrs = palloc0_array(Datum, desc->natts);
> > > > isnull = palloc0_array(bool, desc->natts);
> > > 
> > > It looks like there is a memory leak with those arrays.
> > 
> > I suppose you mean store_change(). Yes, I tried to free the individual chunks
> > and forgot these. The next version uses a new, per-change memory context.
> 
> I realize now that I forgot to reset the context at the end of the
> function. I'll fix that in the next version (which will probably be posted
> rather soon).

This is it. One more diff added, to engage BulkInsertState.

-- 
Antonin Houska
Web: https://www.cybertec-postgresql.com


Attachment

pgsql-hackers by date:

Previous
From: Jeff Davis
Date:
Subject: Re: [19] CREATE SUBSCRIPTION ... SERVER
Next
From: Andres Freund
Date:
Subject: Re: gistGetFakeLSN() can return incorrect LSNs