Uploaded image for project: 'Debezium'
  1. Debezium
  2. DBZ-8659

Document PostgreSQL snapshot.isolation.mode property

XMLWordPrintable

      The snapshot.isolation.mode property was added for the PostgreSQL connector in DBZ-1252, but the property was never described in the documentation.

      Users can set this property to specify the transaction isolation level that the connector uses when it takes a snapshot, allowing snapshots to be run with a reader instance other than the default, which uses serializable isolation.
      You set an isolation level to specify the relative consistency level of the initial snapshot, and the type of locking, if any, that the connector enforces on the data set that it reads during the snapshot.
      The property accepts the following values:

      serializable (The default isolation level, which matches the behavior before introduction of this property):
      The connector uses the serializable isolation level to run the initial snapshot. This option prevents a DBA or user from performing certain operations, like the creation of an index on the table, until Debezium concludes the snapshot. (The snapshot is run in a transaction with isolation level REPEATABLE READS, ensuring data consistency between the tables being scanned and blocking DDL on the selected tables and concurrent index creation throughout the database. With options READ ONLY, DEFERRABLE, this prevents serialization anomalies).

      repeatable_read:
      The connector runs the initial snapshot in REPEATABLE READ isolation level. (Ensures data consistency between the tables being scanned and blocking DDL on the selected tables, and concurrent index creation throughout the database. Allows for serialization anomalies.)

      read_committed:
      The connector uses the READ COMMITTED isolation level to run the initial snapshot. This option permits the snapshot to include changes made by other user transactions that haven't yet been committed, i.e. dirty reads.
      Setting this option sacrifices consistency of the initial snapshot in favor of eventual consistency, but provides better database performance for other users during the snapshot.

      read_uncommitted:
      The connector uses the READ UNCOMMITTED isolation level isolation level to run the initial snapshot.

              broldan@redhat.com Robert Roldan
              broldan@redhat.com Robert Roldan
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: