Snapshot replication connection retry v7

When a connection failure with the subscription database occurs during a snapshot replication, Replication Server attempts to reconnect to it. The goal is for the snapshot replication to complete without skipping any tables. When the connection is reestablished, Replication Server restarts or resumes the snapshot replication procedure for the table that was being migrated when the connection was lost. It then performs the data copy for the remaining tables.

Scope and limitations

Database scope: The connection retry capability allows Replication Server to reconnect to the target/subscription database. Retry attempts for connection issues with the source/publication database aren't supported.

Replication scope: This capability allows Replication Server to retry replicating data. Issues with schema replication aren't supported.

You can specify several connection retry options:

  • -snapshotConnRetryCount [<connection_attempts>]

Use the -snapshotConnRetryCount option to specify the number of retry attempts to perform if the subscription database connection fails in a snapshot session. The [<connection_attempts>] value must be a number between 0 and 50. The default is 3 retry attempts.

  • -snapshotConnRetryInterval [<seconds>]

Use the -snapshotConnRetryInterval option to specify the seconds to wait before each subsequent reconnection attempt if the connection to the subscription database fails in a snapshot session. The [<seconds>] value must be a number between 0 and 900. The default is 30 seconds.

  • -snapshotAbortOnConnFailure [true/false]

Specify whether to abort the snapshot replication if all the reconnection attempts fail.

To skip replicating the failed table and proceed to the next table, set -snapshotAbortOnConnFailure to false. The default is true, which aborts the snapshot session if the connection fails after the specified -snapshotConnRetryCount threshold.

  • -snapshotPGIdleTxSessionTimeOut [<seconds>]

Specify idle_in_transaction_session_timeout, which defines the time after which the subscription database terminates the session when a snapshot replication transaction is in idle state. The [<seconds>] value must be greater than 0. The default is 180 seconds.