Re: Seq scans status update - Mailing list pgsql-patches

From Tom Lane
Subject Re: Seq scans status update
Date
Msg-id 21802.1180561551@sss.pgh.pa.us
Whole thread Raw
In response to Re: Seq scans status update  (Jeff Davis <pgsql@j-davis.com>)
Responses Re: Seq scans status update
List pgsql-patches
Jeff Davis <pgsql@j-davis.com> writes:
> On Wed, 2007-05-30 at 15:56 -0400, Tom Lane wrote:
>> In the sync-scan case the idea seems pretty bogus anyway, because the
>> actual working set will be N backends' rings not just one.

> I don't follow. Ideally, in the sync-scan case, the sets of buffers in
> the ring of different scans on the same relation will overlap
> completely, right?

> We might not be at the ideal, but the sets of buffers in the rings
> shouldn't be disjoint, should they?

According to Heikki's explanation here
http://archives.postgresql.org/pgsql-patches/2007-05/msg00498.php
each backend doing a heapscan would collect its own ring of buffers.
You might have a few backends that are always followers, never leaders,
and so never actually fetch any pages --- but for each backend that
actually did any I/O there would be a separate ring.  In practice I'd
expect the lead would "change hands" pretty often and so you'd see all
the backends accumulating their own rings.

            regards, tom lane

pgsql-patches by date:

Previous
From: Jeff Davis
Date:
Subject: Re: Seq scans status update
Next
From: Jeff Davis
Date:
Subject: Re: Seq scans status update