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

Laurenz Albe <laurenz.albe@cybertec.at>

From: Laurenz Albe <laurenz.albe@cybertec.at>
To: "Jamison, Kirk" <k.jamison@jp.fujitsu.com>, "Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>
Cc: 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-01T08:11:50Z
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.

Jamison, Kirk wrote:
> On February 1, 2019, Tsunakawa, Takayuki wrote: 
> 
> > > As most people seem to agree adding the reloption, here's the patch.  
> > > It passes make check, and works like this:
> > Sorry, I forgot to include the modified header file.  Revised patch attached.
> 
> I wonder if there is a better reloption name for shrink_enabled. (truncate_enabled, vacuum_enabled? Hmm. No?)
> On the other hand, shrink_enabled seems to describe well what it's supposed to do when vacuuming tables.
> Besides there's a similarly-named autovacuum_enabled option.

I like "shrink_enabled".

It may sound weird in the ears of PostgreSQL hackers, but will make sense to users.

Perhaps "vacuum_shrink_enabled" would be even better.

Yours,
Laurenz Albe