PGD Synchronous Commit v5

Commit scope kind: SYNCHRONOUS_COMMIT

Overview

PGD's SYNCHRONOUS_COMMIT is a commit scope kind that works in a way that is more like PostgreSQL's Synchronous commit option in its underlying operation. Unlike the PostgreSQL option though, it is configured as a commit scope and is easier to configure and interact with within PGD.

Unlike other commit scope kinds such as GROUP COMMIT and CAMO, the transactions in a SYNCHRONOUS_COMMIT operation will not be transformed into a two phase commit (2PC) transaction, but work more like a Postgres Synchronous commit.

Example

SELECT bdr.add_commit_scope(
    commit_scope_name := 'example_sc_scope',
    origin_node_group := 'left_dc',
    rule := 'MAJORITY (left_dc) SYNCHRONOUS_COMMIT',
    wait_for_ready := true
);

In this example, any node in the left_dc group, when this commit scope is in use, will use SYNCHRONOUS_COMMIT to replicate changes to the other nodes in the left_dc group. It will look for a majority of nodes in the left_dc group to confirm that they have committed the transaction.

Details

Currently SYNCHRONOUS_COMMIT does not use the confirmation levels of the commit scope rule syntax.