Re: VACUUM always makes all pages dirty
| От | Heikki Linnakangas |
|---|---|
| Тема | Re: VACUUM always makes all pages dirty |
| Дата | |
| Msg-id | 471F00A9.3060400@enterprisedb.com обсуждение исходный текст |
| Ответ на | VACUUM always makes all pages dirty (ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp>) |
| Ответы |
Re: VACUUM always makes all pages dirty
|
| Список | pgsql-hackers |
ITAGAKI Takahiro wrote:
> VACUUM in 8.3dev always makes all pages dirty even if there are no jobs.
> In 8.2.5, VACUUM produces no dirty pages in the same workload. Therefore,
> VACUUM on 8.3 takes longer time than 8.2. I doubt some bugs in the
> HOT-related codes here, but I cannot point out the actual position yet...
Yeah, it's definitely a HOT-introdued thing. Vacuum calls
heap_page_prune on every page, and this in heap_page_prune is dirtying
the buffer:
> else
> {
> /*
> * If we didn't prune anything, we have nonetheless updated the
> * pd_prune_xid field; treat this as a non-WAL-logged hint.
> */
> SetBufferCommitInfoNeedsSave(buffer);
> }
I don't have time to dig deeper at this moment. I'll take a look later
today, unless someone beats me to it. We obviously don't want to call
SetBufferCommitInfoNeedsSave if we didn't really change the pd_prune_xid
field.
-- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com
В списке pgsql-hackers по дате отправления: