Re: [PATCHES] Hint Bits and Write I/O

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: [PATCHES] Hint Bits and Write I/O
Дата
Msg-id 20080618143212.GE5077@alvh.no-ip.org
обсуждение исходный текст
Ответ на Hint Bits and Write I/O  (Simon Riggs <simon@2ndquadrant.com>)
Ответы Re: Hint Bits and Write I/O
Список pgsql-hackers
Simon Riggs wrote:

> When running a VACUUM command we always dirty the block when setting
> hint bits, for a number of reasons:
> * VACUUM FULL expects all hint bits to be set prior to moving tuples
> * Setting all hint bits allows us to truncate the clog
> * it forces the VACUUM to write out its own dirty buffers, which is OK,
> since it is a background process.
>
> Other commands call HeapTupleSatisfiesVacuum(), yet these tasks can be
> more flexible with hint bit setting. These include ANALYZE, CREATE
> INDEX, CLUSTER, HOT pruning and index scan marking deleted tuples (with
> changes in all index AMs). This means we have to differentiate between
> VACUUM and other callers of HeapTupleSatisfiesVacuum().
>
> So the patch changes the APIs of HeapTupleSatisfiesVacuum(),
> SetBufferCommitInfoNeedsSave() and SetHintBits() with changes to 13 AM
> and command files. There are many changes in tqual.c, which seems the
> right way because SetHintBits() is inlined. These make the patch fairly
> large, though most of it is simple changes.

If only VACUUM is going to set "flexible" to off, maybe it's better to
leave the APIs as they are and have a global that's set by VACUUM only
(and reset in a PG_CATCH block).

--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: Reducing overhead for repeat de-TOASTing
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pg_dump fails to include sequences, leads to restore fail in any version