Re: Idea for getting rid of VACUUM FREEZE on cold pages

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Idea for getting rid of VACUUM FREEZE on cold pages
Дата
Msg-id AANLkTikHa3o1XdwCFJziLUNxvs31l-RBdLWv7itKZu0O@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Idea for getting rid of VACUUM FREEZE on cold pages  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Idea for getting rid of VACUUM FREEZE on cold pages  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Idea for getting rid of VACUUM FREEZE on cold pages  (Jesper Krogh <jesper@krogh.cc>)
Re: Idea for getting rid of VACUUM FREEZE on cold pages  (Josh Berkus <josh@agliodbs.com>)
Список pgsql-hackers
On Wed, May 26, 2010 at 8:06 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Josh Berkus <josh@agliodbs.com> writes:
>> How does that get us out of reading and writing old pages, though?
>
> Yeah.  Neither PD_ALL_VISIBLE nor the visibility map are going to solve
> your problem, because they cannot become set without having visited the
> page.

Well, maybe I'm confused here, but arranging things so that we NEVER
have to visit the page after initially writing it seems like it's
setting the bar almost impossibly high.   Consider a table that is
regularly written but append-only.  Every time autovacuum kicks in,
we'll go and remove any dead tuples and then mark the pages
PD_ALL_VISIBLE and set the visibility map bits, which will cause
subsequent vacuums to ignore the all-visible portions of the table...
until anti-wraparound kicks in, at which point we'll vacuum the entire
table and freeze everything.

If, however, we decree that you can't write a new tuple into a
PD_ALL_VISIBLE page without freezing the existing tuples, then you'll
still have the small, incremental vacuums but those are pretty cheap,
and in any event, I don't see any way to get rid of them unless
someone can devise a scheme to do away with vacuum entirely.  But you
won't need the full-table vacuum to freeze tuples, because you can
freeze them opportunistically the next time those pages are written
(at which point freezing will be very cheap because the page has to be
written to disk at that point no matter what).

Maybe I'm confused.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: out-of-date comment in CreateRestartPoint()
Следующее
От: Robert Haas
Дата:
Сообщение: Re: [spf:guess] Re: ROLLBACK TO SAVEPOINT