4. Event Tuning

sync_interval (integer)

Check for updates at least this often in milliseconds. Range: [10-60000], default 100

sync_interval_timeout (integer)

Maximum amount of time in milliseconds before issuing a SYNC event, This prevents a possible race condition in which the action sequence is bumped by the trigger while inserting the log row, which makes this bump is immediately visible to the sync thread, but the resulting log rows are not visible yet. If the SYNC is picked up by the subscriber, processed and finished before the transaction commits, this transaction's changes will not be replicated until the next SYNC. But if all application activity suddenly stops, there will be no more sequence bumps, so the high frequent -s check won't detect that. Thus, the need for sync_interval_timeout. Range: [0-120000], default 1000

sync_group_maxsize (integer)

Maximum number of SYNC events to group together when/if a subscriber falls behind. SYNCs are batched only if there are that many available and if they are contiguous. Every other event type in between leads to a smaller batch. And if there is only one SYNC available, even -g60 will apply just that one. As soon as a subscriber catches up, it will apply every single SYNC by itself. Range: [0,10000], default: 20

vac_frequency (integer)

Sets how many cleanup cycles to run before a vacuum is done. 0 disables the builtin vacuum, intended to be used with the pg_autovacuum daemon. Range: [0,100], default: 3

desired_sync_time (integer)

Maximum time planned for grouped SYNCs. If replication is behind, slon will try to increase numbers of syncs done targetting that they should take this quantity of time to process. This is in Range [10000,600000] ms, default 60000.

If the value is set to 0, this logic will be ignored.

quit_sync_provider (integer)

This must be used in conjunction with quit_sync_finalsync, and indicates which provider node's worker thread should be watched to see if the slon should terminate due to reaching some desired "final" event number.

If the value is set to 0, this logic will be ignored.

quit_sync_finalsync (integer)

Final event number to process. This must be used in conjunction with quit_sync_finalsync, and allows the slon to terminate itself once it reaches a certain event for the specified provider.

If the value is set to 0, this logic will be ignored.

lag_interval (string/interval)

Indicates an interval by which this node should lag its providers. If set, this is used in the event processing loop to modify what events are to be considered for queueing; those events newer than now() - lag_interval::interval are left out, to be processed later.

If the value is left empty, this logic will be ignored.

sync_max_rowsize (integer)

Size above which an sl_log_? row's log_cmddata is considered large. Up to 500 rows of this size are allowed in memory at once. Rows larger than that count into the sync_max_largemem space allocated and free()'ed on demand.

The default value is 8192, meaning that your expected memory consumption (for the LOG cursor) should not exceed 8MB.

sync_max_largemem (integer)

Maximum memory allocated for large rows, where log_cmddata are larger than sync_max_rowsize.

Note that the algorithm reads rows until after this value is exceeded. Otherwise, a tuple larger than this value would stall replication. As a result, don't assume that memory consumption will remain smaller than this value.

The default value is 5242880.

remote_listen_timeout (integer)

How long should the remote listener wait before treating the event selection criteria as having timed out? Range: [30-30000], default 300