Re: Questions/Observations related to Gist vacuum

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: Questions/Observations related to Gist vacuum
Дата
Msg-id CAA4eK1KdYTTK1hZFNRL9w789aYdJ-6n=sdhqB8Ws=R6t+GQiYQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Questions/Observations related to Gist vacuum  (Masahiko Sawada <sawada.mshk@gmail.com>)
Ответы Re: Questions/Observations related to Gist vacuum  (Amit Kapila <amit.kapila16@gmail.com>)
Список pgsql-hackers
On Fri, Oct 25, 2019 at 9:22 PM Masahiko Sawada <sawada.mshk@gmail.com> wrote:
>
> On Wed, Oct 23, 2019 at 8:14 PM Amit Kapila <amit.kapila16@gmail.com> wrote:
> >
> > On Tue, Oct 22, 2019 at 2:17 PM Dilip Kumar <dilipbalaut@gmail.com> wrote:
> > >
> > > On Tue, Oct 22, 2019 at 10:53 AM Amit Kapila <amit.kapila16@gmail.com> wrote:
> > >
> > > I have modified as we discussed.  Please take a look.
> > >
> >
> > Thanks, I haven't reviewed this yet, but it seems to be on the right
> > lines.  Sawada-San, can you please prepare the next version of the
> > parallel vacuum patch on top of this patch and enable parallel vacuum
> > for Gist indexes?
>
> Yeah I've sent the latest patch set that is built on top of this
> patch[1]. BTW I looked at this patch briefly but it looks good to me.
>

Today, I have looked at this patch and found a few things that need to
be changed:

1.
 static void gistvacuum_delete_empty_pages(IndexVacuumInfo *info,
-   GistBulkDeleteResult *stats);
-static bool gistdeletepage(IndexVacuumInfo *info, GistBulkDeleteResult *stats,
+   GistVacState *stats);

I think stats is not a good name for GistVacState.  How about vstate?

2.
+ /* we don't need the internal and empty page sets anymore */
+ MemoryContextDelete(vstate.page_set_context);

After memory context delete, we can reset this and other related
variables as we were doing without the patch.

3.  There are a couple of places in code (like comments, README) that
mentions the deletion of empty pages in the second stage of the
vacuum.  We should change all such places.

I have modified the patch for the above points and additionally ran
pgindent.  Let me know what you think about the attached patch?

-- 
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Amit Langote
Дата:
Сообщение: Re: progress report for ANALYZE
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: [Proposal] Level4 Warnings show many shadow vars