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

Andres Freund <andres@anarazel.de>

From: Andres Freund <andres@anarazel.de>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Michael Paquier <michael@paquier.xyz>, Amit Kapila <amit.kapila16@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, Fujii Masao <masao.fujii@gmail.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2018-04-19T20:23:58Z
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 2018-04-19 16:56:59 -0300, Alvaro Herrera wrote:
> Michael Paquier wrote:
> 
> > Then, let's consider the beginning of the first commit fest of v12 as
> > judgement.  Implementing radix tree for shared buffers is a long-term
> > project, which has no guarantee to get merged, while a visibly-simple
> > reloptions which helps in some cases...
> 
> In the scenario we studied, the truncations were causing periodic
> hiccups which were quite severe.

Was that with the current logic of breaking the truncations into smaller
chunks?


> The truncations were completely
> useless anyway because the table grew back to the original size daily (a
> few dozen GBs I think).  That was a lot of unnecessary work, and under
> exclusive lock no less.

FWIW, One goal of the different buffer mapping implementation is to also
make both increasing and decreasing size of relations possible without
an AEL.

Greetings,

Andres Freund