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: Peter Geoghegan <pg(at)bowt(dot)ie>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andres Freund <andres(at)anarazel(dot)de>, Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, "Bossart, Nathan" <bossartn(at)amazon(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: New vacuum option to do only freezing
Date: 2019-04-26 09:59:06
Message-ID: CAD21AoAN7pJzx0hcW4Tr5=rCBC6R3n_vY82Su-38xJUQdpEoiA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Apr 26, 2019 at 12:11 AM Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>
> On Tue, Apr 23, 2019 at 7:09 AM Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
> > For the second issue, I've changed lazy vacuum so that it reports both
> > the number of kilobytes we freed and the number of kilobytes can be
> > freed after index cleanup.
>
> I am not very convinced that this reporting is in any useful to users.
> Despite N kilobytes of tuples having been freed, the pages themselves
> are still allocated and the actual ability to reuse that space may be
> dependent on lots of factors that the user can't control like the
> sizes of newly-inserted tuples and the degree to which the free space
> map is accurate.

Hmm, it's a term problem? The phrase 'x bytes vacuumed' would solve it?

>
> I feel like we're drifting off into inventing new kinds of reporting
> here instead of focusing on fixing the reported defects of the
> already-committed patch, but perhaps I am taking too narrow a view of
> the situation.

I should have divided the patches into two: fixing assertion error and
the reporting. I think we could think the latter issue also is a kind
of bug because it can report something like "1000 index tuples
vacuumed but 0 heap tuple vacuumed" in case where the vacuumed table
had only dead line pointers. Maybe I should add an another open item
for the latter.

Attached the split version patches.

Regards,

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

Attachment Content-Type Size
fix_vacuum_reporting_v2.patch application/octet-stream 17.1 KB
fix_assertion_v2.patch application/octet-stream 1.7 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Rajkumar Raghuwanshi 2019-04-26 10:29:31 Re: [HACKERS] advanced partition matching algorithm for partition-wise join
Previous Message Etsuro Fujita 2019-04-26 09:25:38 Re: pgsql: Allow insert and update tuple routing and COPY for foreign table