Re: Autovacuum fails to keep visibility map up-to-date in mostly-insert-only-tables - Mailing list pgsql-hackers

From Jeff Janes
Subject Re: Autovacuum fails to keep visibility map up-to-date in mostly-insert-only-tables
Date
Msg-id CAMkU=1zf1Yo0dYJzJ-pk9o4mwLuMD4Uzw6Jck7u1nC_Xb2gYWA@mail.gmail.com
Whole thread Raw
In response to Re: Autovacuum fails to keep visibility map up-to-date in mostly-insert-only-tables  (Andres Freund <andres@2ndquadrant.com>)
Responses Re: Autovacuum fails to keep visibility map up-to-date in mostly-insert-only-tables
Re: Autovacuum fails to keep visibility map up-to-date in mostly-insert-only-tables
List pgsql-hackers
On Mon, Oct 20, 2014 at 5:46 PM, Andres Freund <andres@2ndquadrant.com> wrote:
On 2014-10-20 17:43:26 -0700, Josh Berkus wrote:
> On 10/20/2014 05:39 PM, Jim Nasby wrote:
> > Or maybe vacuum isn't the right way to handle some of these scenarios.
> > It's become the catch-all for all of this stuff, but maybe that doesn't
> > make sense anymore. Certainly when it comes to dealing with inserts
> > there's no reason we *have* to do anything other than set hint bits and
> > possibly freeze xmin.
>
> +1

A page read is a page read. What's the point of heaving another process
do it?

It is only a page read if you have to read the page.  It would seem optimal to have bgwriter adventitiously set hint bits and vm bits, because that is the last point at which the page can be changed without risking that it be written out twice. At that point, it has been given the maximum amount of time it can be given for the interested transactions to have committed and to have aged past the xmin horizon.  I seem to recall that the main problem with that, though, is that you must be attached to a database in order to determine visibility, and bgwriter is not attached to a database.

Cheers,

Jeff

pgsql-hackers by date:

Previous
From: Jeff Janes
Date:
Subject: Re: wal-size limited to 16MB - Performance issue for subsequent backup
Next
From: Tom Lane
Date:
Subject: Re: expected/sequence_1.out obsolete?