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 AANLkTil6xfScg0nFQoEwzU5CT0LOWDjdS-8XtpKCoZ0Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Idea for getting rid of VACUUM FREEZE on cold pages  (Josh Berkus <josh@agliodbs.com>)
Список pgsql-hackers
On Thu, May 27, 2010 at 2:17 PM, Josh Berkus <josh@agliodbs.com> wrote:
> On 5/26/10 6:32 PM, Robert Haas wrote:
>> Hmm, yeah.  Maybe we should freeze when we set PD_ALL_VISIBLE; that
>> might be just as good, and simpler.  Assuming the visibility map is
>> sufficiently crash-safe/non-buggy, we could then teach VACUUM that
>> it's OK to advance relfrozenxid even when doing just a partial vacuum
>> - because any pages that were skipped must contain only frozen tuples.
>>  Previously you've objected to proposals in this direction because
>> they might destroy forensic information, but maybe we should do it
>> anyway.
>
> It would be an improvement, and easier than the various ways of never
> having to visit the pages, which are all fairly intensive.  Given the
> destruction of rollback information, though, we'd probably want a way to
> switch this behaviour on and off as an autovacuum setting.

It's not going to destroy anything that is needed for rollback unless
there's a bug - PD_ALL_VISIBLE only gets set when all tuples on the
page are visible to all backends.  That can't happen until all
transactions that wrote the page, and all others that have a lower
xmin, have committed.  That having been said, if making it a GUC makes
people less nervous about doing it, then +1 from me.

> Does this send us down the wrong path, though?  I thought we wanted to
> think about removing hint bits so that we could implement things like
> CRCs.  No?

PD_ALL_VISIBLE is a page-level bit, not a tuple-level bit, and I
strongly suspect it's not going anywhere.  It's critical
infrastructure for index-only scans, among other things.

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


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: JSON manipulation functions
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Idea for getting rid of VACUUM FREEZE on cold pages