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

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Autovacuum fails to keep visibility map up-to-date in mostly-insert-only-tables
Дата
Msg-id 20141027215144.GX1791@alvin.alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: Autovacuum fails to keep visibility map up-to-date in mostly-insert-only-tables  (Jeff Janes <jeff.janes@gmail.com>)
Ответы Re: Autovacuum fails to keep visibility map up-to-date in mostly-insert-only-tables
Список 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 по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: jsonb generator functions
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Add CREATE support to event triggers