Re: Postgres 11 release notes - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Postgres 11 release notes
Date
Msg-id 20180511191131.GG18510@momjian.us
Whole thread Raw
In response to Re: Postgres 11 release notes  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: Postgres 11 release notes  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
On Fri, May 11, 2018 at 04:00:58PM -0300, Alvaro Herrera wrote:
> Bruce Momjian wrote:
> 
> > OK, so what is the text that people will understand?  This?
> > 
> >     Prevent manual VACUUMs on append-only tables from performing
> >     needless index scans
> 
> Make vacuum cheaper by avoiding scans of btree indexes when not
> necessary
> ?
> 
> Why "manual vacuum"?  It's a problem with vacuums invoked from
> autovacuum too.

Uh, from the commit it says:

    When workload on particular table is append-only, then autovacuum
    isn't intended to touch this table. However, user may run vacuum
    manually in order to fill visibility map and get benefits of
    --------
    index-only scans.  Then ambulkdelete wouldn't be called for
    indexes of such table (because no heap tuples were deleted), only
                                   ---------------------------
    amvacuumcleanup would be called In this case, amvacuumcleanup
    would perform full index scan for two objectives: put recyclable
    pages into free space map and update index statistics.

Why would autovacuum run on a table with no expired index entries?

Personally, I think the fact that autovacuum doesn't run on suvch tables
and therefore doesn't automatically do index-only scans is a problem. I
tried to fix it years ago, but failed and gave up.

-- 
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+                      Ancient Roman grave inscription +


pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Postgres 11 release notes
Next
From: Bruce Momjian
Date:
Subject: Re: Postgres 11 release notes