]> granicus.if.org Git - postgresql/commit
Add a barrier primitive for synchronizing backends.
authorAndres Freund <andres@anarazel.de>
Thu, 30 Nov 2017 01:07:16 +0000 (17:07 -0800)
committerAndres Freund <andres@anarazel.de>
Thu, 30 Nov 2017 01:07:16 +0000 (17:07 -0800)
commit1145acc70debacc34de01fac238defde543f4ed4
tree9fa97305a0fb9a7ccb91a2d086c37a2f3ec33c9c
parentfa330f9adf4e83c0707b0b1164e7bf09c9204b3d
Add a barrier primitive for synchronizing backends.

Provide support for dynamic or static parties of processes to wait for
all processes to reach point in the code before continuing.

This is similar to the mechanism of the same name in POSIX threads and
MPI, though has explicit phasing and dynamic party support like the
Java core library's Phaser.

This will be used by an upcoming patch adding support for parallel
hash joins.

Author: Thomas Munro
Reviewed-By: Andres Freund
Discussion: https://postgr.es/m/CAEepm=2_y7oi01OjA_wLvYcWMc9_d=LaoxrY3eiROCZkB_qakA@mail.gmail.com
src/backend/storage/ipc/Makefile
src/backend/storage/ipc/barrier.c [new file with mode: 0644]
src/include/storage/barrier.h [new file with mode: 0644]