Use atomic ops to hand out pages to scan in parallel scan.

With a lot of CPUs, the spinlock that protects the current scan location
in a parallel scan can become a bottleneck. Use an atomic fetch-and-add
instruction instead.

David Rowley

Discussion: 
https://www.postgresql.org/message-id/cakjs1f9tgsphqbcopjv9_kupzvtlcz4jy%3db%3dbhqgakn7cyz...@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/3cda10f41bfed7e34b0db7013b66dd40a5f75926

Modified Files
--------------
src/backend/access/heap/heapam.c | 102 ++++++++++++++++++++++-----------------
src/include/access/relscan.h     |   5 +-
2 files changed, 62 insertions(+), 45 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers

Reply via email to