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

From Alvaro Herrera
Subject Re: Autovacuum fails to keep visibility map up-to-date in mostly-insert-only-tables
Date
Msg-id 20141027215144.GX1791@alvin.alvh.no-ip.org
Whole thread Raw
In response to Re: Autovacuum fails to keep visibility map up-to-date in mostly-insert-only-tables  (Jeff Janes <jeff.janes@gmail.com>)
Responses Re: Autovacuum fails to keep visibility map up-to-date in mostly-insert-only-tables
List pgsql-hackers
Jeff Janes wrote:

> 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.

Regarding tuple hint bits, I couldn't find any such limitation in
SetHintBits, other than in MarkBufferDirtyHint there being some code
that would cause trouble: it accesses MyPgXact, which bgwriter would
obviously not have.  Maybe worth some experimentation ...

I'm not sure about vm bits, though.  That's a whole different topic.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: jsonb generator functions
Next
From: Andres Freund
Date:
Subject: Re: Add CREATE support to event triggers