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

Tsunakawa, Takayuki <tsunakawa.takay@jp.fujitsu.com>

From: "Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>
To: 'Michael Paquier' <michael@paquier.xyz>, Laurenz Albe <laurenz.albe@cybertec.at>
Cc: "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-04T00:24:47Z
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.

From: Michael Paquier [mailto:michael@paquier.xyz]
> On Fri, Feb 01, 2019 at 09:11:50AM +0100, Laurenz Albe wrote:
> > Perhaps "vacuum_shrink_enabled" would be even better.
> 
> Naming it just vacuum_truncate and autovacuum_truncate (with aliases for
> toast and such), looks more natural to me.  "shrink" is not a term used
> in the code at all to describe this phase of vacuuming, and this option
> talks mainly to people who are experts in PostgreSQL internals in my opinion.

FYI, it seems that the user sees "shrink" rather than "truncate" in the documentation as below, although these are about VACUUM FULL.

https://www.postgresql.org/docs/devel/sql-vacuum.html
would like the table to physically shrink to occupy less disk space 

https://www.postgresql.org/docs/devel/routine-vacuuming.html
shrink a table back to its minimum size and return the disk space to the operating system, 



Anyway, I don't have any favor about naming this, and I hope native English speakers will choose the best name.  I won't object to whatever name any committer chooses.


Regards
Takayuki Tsunakawa