Re: reloption to prevent VACUUM from truncating empty pages at the end of relation

From: Julien Rouhaud <rjuju123(at)gmail(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Takayuki Tsunakawa <tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, David Steele <david(at)pgmasters(dot)net>, "Bossart, Nathan" <bossartn(at)amazon(dot)com>, Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, "Jamison, Kirk" <k(dot)jamison(at)jp(dot)fujitsu(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: reloption to prevent VACUUM from truncating empty pages at the end of relation
Date: 2019-04-08 11:15:24
Message-ID: CAOBaU_avBJFxKaduY_qBFxgn6QNj731QyN0F_svSNgmuWu8zuQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Apr 8, 2019 at 12:22 PM Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
>
> On Mon, Apr 8, 2019 at 5:30 PM Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
> >
> > On Mon, Apr 8, 2019 at 5:15 PM Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
> > >
> > > On Mon, Apr 8, 2019 at 3:58 PM Julien Rouhaud <rjuju123(at)gmail(dot)com> wrote:
> > > >
> > > > On Mon, Apr 8, 2019 at 8:01 AM Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
> > > > >
> > > > > 2019年4月8日(月) 14:22 Tsunakawa, Takayuki <tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com>:
> > > > >>
> > > > >> From: Alvaro Herrera [mailto:alvherre(at)2ndquadrant(dot)com]
> > > > >> > "vacuum_truncate" gets my vote too.
> > > > >>
> > > > >> +1
> > > > >
> > > > >
> > > > > +1
> > > > > ISTM that we have small consensus to
> > > > > use "vacuum_truncate".
> > > >
> > > > I'm also fine with this name, and I also saw reports that this option
> > > > is already needed in some production workload, as Andres explained.
> > >
> > > OK, so I pushed the "vacuum_truncate" version of the patch.
> >
> > Thank you!
> >
> > "TRUNCATE" option for vacuum command should be added to the open items?
>
> Yes, I think.
> Attached is the patch which adds TRUNCATE option into VACUUM.

Thanks.

I just reviewed the patch, it works as expected, no special comment on the code.

Minor nitpicking:

- lock on the table.
+ lock on the table. The <literal>TRUNCATE</literal> parameter
+ to <xref linkend="sql-vacuum"/>, if specified, overrides the value
+ of this option.

maybe "parameter of" instead of "parameter to"?

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro HORIGUCHI 2019-04-08 11:42:51 Re: Problem with default partition pruning
Previous Message Masahiko Sawada 2019-04-08 10:29:51 Re: reloption to prevent VACUUM from truncating empty pages at the end of relation