Re: VACUUM always makes all pages dirty

From: "Pavan Deolasee" <pavan(dot)deolasee(at)gmail(dot)com>
To: "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com>
Cc: "ITAGAKI Takahiro" <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: VACUUM always makes all pages dirty
Date: 2007-10-24 08:45:12
Message-ID: 2e78013d0710240145x48dd4be2ydcf6430a80593a7a@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 10/24/07, Heikki Linnakangas <heikki(at)enterprisedb(dot)com> wrote:
>
>
> 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.
>
>
I am looking at it. We must not call SetBufferCommitInfoNeedsSave unless
we make any state changes to the page.

Thanks,
Pavan

--
Pavan Deolasee
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dharmendra Goyal 2007-10-24 09:39:11 second DML operation fails with updatable cursor
Previous Message Heikki Linnakangas 2007-10-24 08:22:01 Re: VACUUM always makes all pages dirty