You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Commitb5a9b18 introduced block streaming infrastructure with a specialfast path for all-cached scans, and commitb7b0f3f connected theinfrastructure up to sequential scans. One of the fast pathmicro-optimizations had an unintended consequence: it interfered withparallel sequential scan's block range allocator (from commit56788d2),which has its own ramp-up and ramp-down algorithm when handing outgroups of pages to workers. A scan of an all-cached table could giveextra blocks to one worker, when others had finished. In some plans(probably already very bad plans, such as the one reported byAlexander), the unfairness could be magnified.An internal buffer of 16 block numbers is removed, keeping just a singleblock buffer for technical reasons.Back-patch to 17.Reported-by: Alexander Lakhin <exclusion@gmail.com>Discussion:https://postgr.es/m/63a63690-dd92-c809-0b47-af05459e95d1%40gmail.com