From: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
---|---|
To: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com> |
Cc: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, 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-12-09 08:57:54 |
Message-ID: | CAA4eK1KdYTTK1hZFNRL9w789aYdJ-6n=sdhqB8Ws=R6t+GQiYQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Oct 25, 2019 at 9:22 PM Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
>
> On Wed, Oct 23, 2019 at 8:14 PM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> >
> > On Tue, Oct 22, 2019 at 2:17 PM Dilip Kumar <dilipbalaut(at)gmail(dot)com> wrote:
> > >
> > > On Tue, Oct 22, 2019 at 10:53 AM Amit Kapila <amit(dot)kapila16(at)gmail(dot)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
Attachment | Content-Type | Size |
---|---|---|
v3-0001-Delete-empty-pages-in-each-pass-during-GIST-VACUUM.patch | application/octet-stream | 15.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2019-12-09 09:03:29 | Re: [Proposal] Level4 Warnings show many shadow vars |
Previous Message | PikachuEXE | 2019-12-09 08:57:34 | Re: BUG #16147: postgresql 12.1 (from homebrew) - pg_restore -h localhost --jobs=2 crashes |