On Fri, Oct 25, 2019 at 9:22 PM Masahiko Sawada <sawada.m...@gmail.com> wrote: > > On Wed, Oct 23, 2019 at 8:14 PM Amit Kapila <amit.kapil...@gmail.com> wrote: > > > > On Tue, Oct 22, 2019 at 2:17 PM Dilip Kumar <dilipbal...@gmail.com> wrote: > > > > > > On Tue, Oct 22, 2019 at 10:53 AM Amit Kapila <amit.kapil...@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
v3-0001-Delete-empty-pages-in-each-pass-during-GIST-VACUUM.patch
Description: Binary data