Re: scan_recycle_buffers

From: "Simon Riggs" <simon(at)2ndquadrant(dot)com>
To: "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com>
Cc: <pgsql-patches(at)postgresql(dot)org>
Subject: Re: scan_recycle_buffers
Date: 2007-03-09 20:37:42
Message-ID: 1173472663.3641.351.camel@silverbirch.site
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

On Fri, 2007-03-09 at 20:08 +0000, Heikki Linnakangas wrote:
> Simon Riggs wrote:
> > Patch to implement buffer cache recycling for scans, as being discussed
> > on pgsql-hackers.
>
> A few questions come to mind:

Good questions. I don't expect this will go through easily, so we need
to examine these thoughts thoroughly.

> How does it behave with Jeff's synchronized seq scans patch?

I've offered Jeff lots of support throughout that patch's development
and its a feature I'd like to see. The current synch scan patch relies
upon the cache spoiling effect to gain its benefit. I think that can be
tightened up, so that we can make both work.

Currently synch scans help DSS apps but not OLTP. This patch reduces the
negative effects of VACUUM on OLTP workloads, as well as helping DSS.

> I wonder if calling RelationGetNumberOfBlocks on every seq scan becomes
> a performance issue for tiny tables with for example just 1 page. It
> performs an lseek, which isn't free.

Jeff's patch does this also, for similar reasons.

> What happens if multiple backends choose overlapping sets of buffers to
> recycle?

They won't. If a buffer is pinned, it will fall out of the the list of
buffers being recycled and not be reused. So they will each tend towards
a unique list of buffers.

--
Simon Riggs
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Lukas Kahwe Smith 2007-03-09 20:50:18 Re: who gets paid for this
Previous Message Heikki Linnakangas 2007-03-09 20:08:55 Re: scan_recycle_buffers

Browse pgsql-patches by date

  From Date Subject
Next Message Jim Nasby 2007-03-09 21:41:10 Re: Auto creation of Partitions
Previous Message Heikki Linnakangas 2007-03-09 20:08:55 Re: scan_recycle_buffers