Re: [PATCHES] Trivial patch to double vacuum speed on tables with no indexes

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Gregory Stark <stark(at)enterprisedb(dot)com>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCHES] Trivial patch to double vacuum speed on tables with no indexes
Date: 2006-09-04 22:11:53
Message-ID: 20060904221153.GW4586@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Gregory Stark wrote:
>
> Bruce Momjian <bruce(at)momjian(dot)us> writes:
>
> > Tom Lane wrote:
> >> Bruce Momjian <bruce(at)momjian(dot)us> writes:
> >> > Patch applied. Thanks.
> >>
> >> Wait a minute. This patch changes the behavior so that
> >> LockBufferForCleanup is applied to *every* heap page, not only the ones
> >> where there are removable tuples. It's not hard to imagine scenarios
> >> where that results in severe system-wide performance degradation.
> >> Has there been any real-world testing of this idea?
> >
> > I see the no-index case now:
> >
> > + if (nindexes)
> > + LockBuffer(buf, BUFFER_LOCK_SHARE);
> > + else
> > + LockBufferForCleanup(buf);
> >
> > Let's see what Greg says, or revert.
>
> Hm, that's a good point. I could return it to the original method where it
> released the share lock and did he LockBufferForCleanup only if necessary. I
> thought it was awkward to acquire a lock then release it to acquire a
> different lock on the same buffer but it's true that it doesn't always have to
> acquire the second lock.

This rush to apply patches just because no one seems to be capable of
keeping up with them not being reviewed, is starting to get a bit
worrisome.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2006-09-04 22:22:44 Re: [COMMITTERS] pgsql: sslinfo contrib module - information about current SSL
Previous Message Tom Lane 2006-09-04 22:11:16 Re: plpgsql, return can contains any expression

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2006-09-04 22:53:19 Re: [PATCHES] Trivial patch to double vacuum speed
Previous Message Tom Lane 2006-09-04 22:11:16 Re: plpgsql, return can contains any expression