Re: [HACKERS] VACUUM always makes all pages dirty

2007-10-24 Thread Tom Lane
"Pavan Deolasee" <[EMAIL PROTECTED]> writes: > The attached patch should fix this. We mark the buffer dirty only if there > is any state change in the page header. Applied, with minor additional tweak to avoid duplicate calls to SetBufferCommitInfoNeedsSave --- that seems (just) expensive enough t

Re: [HACKERS] VACUUM always makes all pages dirty

2007-10-24 Thread Pavan Deolasee
On 10/24/07, Pavan Deolasee <[EMAIL PROTECTED]> wrote: > > > > I am looking at it. We must not call SetBufferCommitInfoNeedsSave unless > we make any state changes to the page. > > > The attached patch should fix this. We mark the buffer dirty only if there is any state change in the page header.

Re: [HACKERS] VACUUM always makes all pages dirty

2007-10-24 Thread Pavan Deolasee
On 10/24/07, Heikki Linnakangas <[EMAIL PROTECTED]> 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

Re: [HACKERS] VACUUM always makes all pages dirty

2007-10-24 Thread Heikki Linnakangas
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 ac