Surgex.DataPipe.FollowerSync (Surgex v5.0.0) View Source
Acquires a PostgreSQL slave synchronization with a remote master.
Usage
It can be configured globally or per repo as follows:
config :surgex,
follower_sync_enabled: true,
follower_sync_timeout: 15_000,
follower_sync_interval: 1_000
config :my_project, MyProject.MyRepo,
# ...
follower_sync_enabled: true,
follower_sync_timeout: 15_000,
follower_sync_interval: 1_000
As a convenience versus calling Surgex.DataPipe.FollowerSync.call/2
all the time, it can be
use
d in a repo module as follows:
defmodule MyProject.MyRepo do
use Surgex.DataPipe.FollowerSync
end
MyProject.MyRepo.ensure_follower_sync(lsn)
Refer to Surgex.DataPipe
for a complete data pipe example.
Link to this section Summary
Functions
Waits for a given slave repo's sync up to specific remote master's lsn.
Link to this section Functions
Waits for a given slave repo's sync up to specific remote master's lsn.