Re: old synchronized scan patch
От | Gregory Stark |
---|---|
Тема | Re: old synchronized scan patch |
Дата | |
Msg-id | 87r6vcj794.fsf@enterprisedb.com обсуждение исходный текст |
Ответ на | Re: old synchronized scan patch (Csaba Nagy <nagy@ecircle-ag.com>) |
Список | pgsql-hackers |
"Csaba Nagy" <nagy@ecircle-ag.com> writes: > 1) How about 2 location hints, one for the actual reads, and one for the > followers ? Having the location of the pack leader may be useful for another reason too: It would give the trailers a chance to avoid competing with the pack leader. I would expect no matter how far back they start they'll quickly catch up to the pack leader since they're only doing cached reads and the pack leader is having to do actual i/o. When they catch up they're going to compete for the lead which may a) kill the kernel read-ahead and b) cause contention. If they know where the oldest trailer is and where the leader is then when they catch up they could sleep for a small amount of time to give the leader a chance to make progress. I would suggest they should only sleep once and if they catch up again they should try to take over and become the new leader. If the leader ever finds its reading a cached block and someone else has passed it it should switch to follower behaviour. That way the leadership does change hands periodically but not on every read. Just in case the first leader is, say, running a nested loop or something we don't want the follower to be unnecessarily limited to its speed. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com
В списке pgsql-hackers по дате отправления: