Re: Remove xmin and cmin from frozen tuples

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Remove xmin and cmin from frozen tuples
Дата
Msg-id 12117.1125580955@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Remove xmin and cmin from frozen tuples  (ITAGAKI Takahiro <itagaki.takahiro@lab.ntt.co.jp>)
Ответы Additional background daemon (was: Remove xmin and cmin from frozen tuples)  ("Jim C. Nasby" <jnasby@pervasive.com>)
Re: Remove xmin and cmin from frozen tuples  (Pailloncy Jean-Gerard <jg@rilk.com>)
Список pgsql-hackers
ITAGAKI Takahiro <itagaki.takahiro@lab.ntt.co.jp> writes:
> I agree. I think an good position of freezer is on bgwriter.
> My idea is:
>   1. Just before bgwriter writes an dirty page in LRU order,
>   2. Freeze tuples in the page and repair fragmentation.
>   3. (Replace the fsm page that has least freespace.)
>   4. Flush the page.

This is a bad idea.  The bgwriter isn't the place to be doing freezing,
because there is no reasonable way for it to guarantee that all old
tuples in a table (or any larger unit) have been frozen.  So you'd still
need VACUUM to ensure no wraparound.  Plus, you can't do such changes
without emitting an XLOG record, which is something we don't want
happening in the bgwriter's inner loop.  Even more to the point, you
can't do such changes without getting a superexclusive lock on the page
(not only locked, but no one else has it pinned), which is a real
nonstarter for the bgwriter, both for performance and possible deadlock
issues.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: broken configure, broken makefile?
Следующее
От: "Zeugswetter Andreas DAZ SD"
Дата:
Сообщение: Re: Pre-allocated free space for row