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

Masahiko Sawada <sawada.mshk@gmail.com>

From: Masahiko Sawada <sawada.mshk@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: "Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>, Julien Rouhaud <rjuju123@gmail.com>, Laurenz Albe <laurenz.albe@cybertec.at>, "Jamison, Kirk" <k.jamison@jp.fujitsu.com>, Alvaro Herrera <alvherre@2ndquadrant.com>, Amit Kapila <amit.kapila16@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, Fujii Masao <masao.fujii@gmail.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2019-02-25T06:59:21Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Add TRUNCATE parameter to VACUUM.

  2. Add vacuum_truncate reloption.

  3. Allow VACUUM to be run with index cleanup disabled.

On Mon, Feb 25, 2019 at 3:56 PM Michael Paquier <michael@paquier.xyz> wrote:
>
> On Mon, Feb 25, 2019 at 02:38:05AM +0000, Tsunakawa, Takayuki wrote:
> > From: Julien Rouhaud [mailto:rjuju123@gmail.com]
> >> One last thing, I think we should at least add one regression test for
> >> this setting.  The one you provided previously seems perfectly suited.
> >
> > Thanks, added.
>
> +SELECT pg_relation_size('reloptions_test');
> + pg_relation_size
> +------------------
> +             8192
> +(1 row)
> This makes the test page-size sensitive.  While we don't ensure that
> tests can be run with different page sizes, we should make a maximum
> effort to keep the tests compatible if that's easy enough.

Also, I think that this test may fail in case where concurrent
transactions are running. So maybe should not run it in parallel to
other tests.

Regards,

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