Re: old synchronized scan patch - Mailing list pgsql-hackers

From Tom Lane
Subject Re: old synchronized scan patch
Date
Msg-id 6940.1165341378@sss.pgh.pa.us
Whole thread Raw
In response to Re: old synchronized scan patch  (Jeff Davis <pgsql@j-davis.com>)
Responses Re: old synchronized scan patch
List pgsql-hackers
Jeff Davis <pgsql@j-davis.com> writes:
> On Tue, 2006-12-05 at 11:45 -0500, Tom Lane wrote:
>> ... If you have N processes doing a synchronized
>> scan, then each block that reaches shared memory is going to be hit N
>> times in fairly short succession --- which is going to be enough to
>> convince the bufmgr to keep it in memory for awhile.  Thus a
>> synchronized seqscan is likely to end up flushing buffer cache in a way
>> that independent seqscans could not.

> Interesting. That may be an important consideration. If a bunch of
> backends read the block though, I don't see it as a major loss if it
> hangs around to see if one more backend needs it.

Sure, it should hang around for awhile, and will.  The problem is that
its lifetime will be artificially inflated, so that the seqscan ends up
kicking out other blocks that are really of greater importance, rather
than recycling its own old blocks as it should.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Greg Mitchell
Date:
Subject: Re: Storing a dynahash for an entire connection or
Next
From: Volkan YAZICI
Date:
Subject: Preserving Cluster-Wise Data