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

Amit Kapila <amit.kapila16@gmail.com>

From: Amit Kapila <amit.kapila16@gmail.com>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Laurenz Albe <laurenz.albe@cybertec.at>, Tom Lane <tgl@sss.pgh.pa.us>, Fujii Masao <masao.fujii@gmail.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2018-11-15T10:11:03Z
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 Thu, Nov 15, 2018 at 2:30 PM Alvaro Herrera <alvherre@2ndquadrant.com> wrote:
>
> On 2018-Nov-15, Laurenz Albe wrote:
>
> > This new option would not only mitigate the long shared_buffers scan,
> > it would also get rid of the replication conflict caused by the
> > AccessExclusiveLock taken during truncation, which is discussed in
> > https://www.postgresql.org/message-id/c9374921e50a5e8fb1ecf04eb8c6ebc3%40postgrespro.ru
> > and seems to be a more difficult problem than anticipated.
>
> FWIW I was just reminded yesterday that the AEL-for-truncation has been
> diagnosed to be a severe problem in production, and with no other
> solution in sight, I propose to move forward with the stop-gap.
>

+1.

-- 
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com