Re: New vacuum option to do only freezing

From: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: "Bossart, Nathan" <bossartn(at)amazon(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: New vacuum option to do only freezing
Date: 2019-01-21 10:20:33
Message-ID: CAD21AoBJBj1Mx3ZFp-wkzRN7pJ6hfa-YykDAZTgCyQS5JrF4Jg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Jan 19, 2019 at 5:08 AM Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>
> On Thu, Jan 17, 2019 at 1:57 AM Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
> > The reason why I processed the tuples that became dead after the first
> > heap pass is that I was not sure the reason why we ignore such tuples
> > in the second heap pass despite of there already have been the code
> > doing so which has been used for a long time. I thought we can do that
> > in the same manner even in DISABLE_INDEX_CLEANUP case. Also, since I
> > thought that lazy_vacuum_page() is the best place to set them as DEAD
> > I modified it (In the previous patch I introduced another function
> > setting them as DEAD aside from lazy_vacuum_page(). But since these
> > were almost same I merged them).
>
> The race you're concerned about is extremely narrow. We HOT-prune the
> page, and then immediately afterward -- probably a few milliseconds
> later -- we loop over the tuples still on the page and check the
> status of each one. The only time we get a different answer is when a
> transaction aborts in those few milliseconds. We don't worry about
> handling those because it's a very rare condition.
>

Understood and Agreed. I've attached the new version patch
incorporated the review comments.

Regards,

--
Masahiko Sawada
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

Attachment Content-Type Size
v5-0001-Add-DISABLE_INDEX_CLEANUP-option-to-VACUUM-comman.patch application/octet-stream 11.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2019-01-21 10:42:16 libpq environment variables in the server
Previous Message Fabien COELHO 2019-01-21 09:50:44 Re: [PATCH] pgbench tap tests fail if the path contains a perl special character