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

From Tom Lane
Subject Re: old synchronized scan patch
Date
Msg-id 6303.1165470394@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  ("Jim C. Nasby" <jim@nasby.net>)
Re: old synchronized scan patch  (Csaba Nagy <nagy@ecircle-ag.com>)
Re: old synchronized scan patch  ("Florian G. Pflug" <fgp@phlo.org>)
Re: old synchronized scan patch  (Jeff Davis <pgsql@j-davis.com>)
List pgsql-hackers
Jeff Davis <pgsql@j-davis.com> writes:
> Even if there are 50 in the pack, and 2 trailing, at any point in time
> it's more likely that the last block number reported was reported by a
> trailing scan. The pack might all report at once when they finally get
> the block, but will be promptly overwritten by the continuous stream of
> reports from trailing scans.

> However, if my analysis was really true, one might wonder how those
> scans got that far behind in the first place.

Yah.  Something I was idly wondering about: suppose we teach ReadBuffer
to provide an indication whether it had to issue an actual read() or
found the block in cache?  Could it be useful to not report the block
location to the hint area if we had to actually read()?  That would
eliminate the immediate "pack leader" from the equation.  The problem
is that it seems to break things for the case of the first follower
joining a seqscan, because the original leader would never report.
Anyone see the extra idea needed to make this work?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Jeff Davis
Date:
Subject: Re: old synchronized scan patch
Next
From: "Jim C. Nasby"
Date:
Subject: Re: old synchronized scan patch