pgsql: Add a barrier primitive for synchronizing backends.

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Add a barrier primitive for synchronizing backends.
Date: 2017-11-30 02:28:04
Message-ID: E1eKEa4-0000m9-78@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/1145acc70debacc34de01fac238defde543f4ed4

Modified Files
--------------
src/backend/storage/ipc/Makefile | 2 +-
src/backend/storage/ipc/barrier.c | 311 ++++++++++++++++++++++++++++++++++++++
src/include/storage/barrier.h | 45 ++++++
3 files changed, 357 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2017-11-30 03:01:48 pgsql: Fix neqjoinsel's behavior for semi/anti join cases.
Previous Message Robert Haas 2017-11-30 01:48:46 Re: pgsql: New C function: bms_add_range