CRDTs Overview

CRDTs Overview#

Introduction to CRDTs#

Conflict-free replicated data types (CRDTs) support merging values from concurrently modified rows instead of discarding one of the rows as the traditional resolution does. Each CRDT type is implemented as a separate PostgreSQL data type with an extra callback added to the bdr.crdt_handlers catalog. The merge process happens inside the PGD writer on the apply side without any user action needed.

CRDTs require the table to have column-level conflict resolution enabled, as described in Special problems for column-level conflict resolution .

CRDTs in PostgreSQL#

Implemented CRDTs are installed as part of bdr into the bdr schema. For convenience, the basic operators (+ , # and ! ) and a number of common aggregate functions (min , max , sum , and avg ) are created in pg_catalog . Thus they are available without having to tweak search_path .