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

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Fujii Masao <masao.fujii@gmail.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2018-04-17T19:09:18Z
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.

Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> Andres was working on a radix tree structure to fix this problem, but
> that seems to be abandoned now, and it seems a major undertaking.  While
> I agree that the proposed solution is a wart, it seems much better than
> no solution at all.  Can we consider Fujii's proposal as a temporary
> measure until we fix shared buffers?  I'm +1 on it myself.

Once we've introduced a user-visible reloption it's going to be
practically impossible to get rid of it, so I'm -1.  I'd much rather
see somebody put some effort into the radix-tree idea than introduce
a kluge that we'll be stuck with, and that doesn't even provide a
good user experience.  Disabling vacuum truncation is *not* something
that I think we should recommend.

			regards, tom lane