Re: Questions/Observations related to Gist vacuum

From: Dilip Kumar <dilipbalaut(at)gmail(dot)com>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Andrey Borodin <x4mmm(at)yandex-team(dot)ru>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Questions/Observations related to Gist vacuum
Date: 2019-10-17 08:16:58
Message-ID: CAFiTN-vFyLmBL=26Joo58QDyM_smdsHa1iQhvCZh4jOWf4ciMg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Oct 17, 2019 at 12:27 PM Heikki Linnakangas <hlinnaka(at)iki(dot)fi> wrote:
>
> On 17/10/2019 05:31, Amit Kapila wrote:
> > On Wed, Oct 16, 2019 at 11:20 AM Dilip Kumar <dilipbalaut(at)gmail(dot)com> wrote:
> >>
> >> On Tue, Oct 15, 2019 at 7:13 PM Heikki Linnakangas <hlinnaka(at)iki(dot)fi> wrote:
> >>>
> >>> On 15/10/2019 09:37, Amit Kapila wrote:
> >>>> While reviewing a parallel vacuum patch [1], we noticed a few things
> >>>> about $SUBJECT implemented in commit -
> >>>> 7df159a620b760e289f1795b13542ed1b3e13b87.
> >>>>
> >>>> 1. A new memory context GistBulkDeleteResult->page_set_context has
> >>>> been introduced, but it doesn't seem to be used.
> >>>
> >>> Oops. internal_page_set and empty_leaf_set were supposed to be allocated
> >>> in that memory context. As things stand, we leak them until end of
> >>> vacuum, in a multi-pass vacuum.
> >>
> >> Here is a patch to fix this issue.
> >
> > The patch looks good to me. I have slightly modified the comments and
> > removed unnecessary initialization.
> >
> > Heikki, are you fine me committing and backpatching this to 12? Let
> > me know if you have a different idea to fix.
>
> Thanks! Looks good to me. Did either of you test it, though, with a
> multi-pass vacuum?

From my side, I have tested it with the multi-pass vacuum using the
gist index and after the fix, it's using expected memory context.

--
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2019-10-17 08:25:54 Re: Remaining calls of heap_close/heap_open in the tree
Previous Message Tom Lane 2019-10-17 08:15:39 Re: Remaining calls of heap_close/heap_open in the tree