Durability
==========

EDB Postgres Distributed (PGD) offers a range of synchronous modes to
complement its default asynchronous replication. These synchronous modes
are configured through commit scopes; rules that define how operations
are handled and when the system should consider a transaction committed.

Introducing
-----------

-  :ref:`PGD overview <PGD overview>`  introduces the concepts and some of the essential
   terminology which is used when discussing synchronous commits.

-  :ref:`Durability Terminology <Durability Terminology>`  lists terms used around PGD’s durability options,
   including how nodes are referred to in replication.

-  :ref:`Commit scopes <Commit scopes>`  is a more in-depth look at the structure of commit
   scopes and how to define them for your needs.

-  :ref:`Commit scope rules <Commit scope rules>`  looks at the syntax of and how to formulate a commit
   scope rule.

-  :ref:`Comparing Durability Options <Comparing Durability Options>`  compares how each option behaves.

Commit scope kinds
------------------

-  :ref:`Group commit <Group commit>`  focuses on the Group Commit option, where you can
   define a transaction as done when a group of nodes agrees it’s done.

-  :ref:`CAMO or commit-at-most-once <CAMO or commit-at-most-once>`  focuses on the Commit At Most Once option, in which
   applications take responsibility for verifying that a transaction has
   been committed before retrying. This ensures that their commits only
   happen at most once.

-  :ref:`Lag Control <Lag Control>`  looks at the commit scope mechanism which dynamically
   throttle nodes according to the slowest node and regulates how far
   out of sync nodes may go when a database node goes out of service.

-  :ref:`PGD Synchronous Commit <PGD Synchronous Commit>`  examines a commit scope mechanism which works in a
   similar fashion to legacy synchronous replication, but from within
   the commit scope framework.

Working with commit scopes
--------------------------

-  :ref:`Administering <Administering>`  addresses how a PGD cluster with Group Commit in use
   should be managed.

-  :ref:`Limitations <Limitations>`  lists the various combinations of durability options
   which are not currently supported or not possible. Do refer to this
   before deciding on a durability strategy.

-  :ref:`Legacy synchronous replication using PGD <Legacy synchronous replication using PGD>`  shows how traditional Postgres synchronous operations
   can still be accessed under PGD.

-  :ref:`Internal Timing of Operations <Internal Timing of Operations>`  compares legacy replication with PGD’s async and
   synchronous operations, especially the difference in the order by
   which transactions are flushed to disk or made visible.

.. toctree::
  :maxdepth: 3

  Using--durability--overview
  Using--durability--durabilityterminology
  Using--durability--commit-scopes
  Using--durability--commit-scope-rules
  Using--durability--comparing
  Using--durability--group-commit
  Using--durability--camo
  Using--durability--lag-control
  Using--durability--synchronous_commit
  Using--durability--administering
  Using--durability--legacy-sync
  Using--durability--limitations
  Using--durability--timing
