Add a C API for parallel heap scans

Enterprise / PostgreSQL - Robert Haas [postgresql.org] - 16 October 2015 16:33 UTC

Using this API, one backend can set up a ParallelHeapScanDesc to which multiple backends can then attach. Each tuple in the relation will be returned to exactly one of the scanning backends. Only forward scans are supported, and rescans must be carefully coordinated.

This is not exposed to the planner or executor yet.

The original version of this code was written by me. Amit Kapila reviewed it, tested it, and improved it, including adding support for synchronized scans, per review comments from Jeff Davis. Extensive testing of this and related patches was performed by Haribabu Kommi. Final cleanup of this patch by me.

ee7ca55 Add a C API for parallel heap scans.
src/backend/access/heap/heapam.c | 244 ++++++++++++++++++++++++++++++++++++--
src/include/access/heapam.h | 8 +-
src/include/access/relscan.h | 20 ++++
3 files changed, 261 insertions(+), 11 deletions(-)

Upstream: git.postgresql.org


  • Share