spock.sub_alter_sync
The spock.sub_alter_sync() function synchronizes all unsynchronized tables
in all sets in a single operation.
Synopsis
spock.sub_alter_sync(subscription_name name, truncate bool)
Description
The spock.sub_alter_sync() function synchronizes all unsynchronized tables
in all sets in a single operation. The function copies and synchronizes
tables one by one. The function does not wait for completion before returning
to the caller; use spock.sub_wait_for_sync() to wait for completion.
Arguments
The function accepts the following arguments:
- The
subscription_nameargument specifies the name of an existing subscription. - The
truncateargument accepts a boolean value; when set totrue, the function truncates tables before copying, and the default value isfalse.
Example
In the following example, the spock.sub_alter_sync() function synchronizes
all unsynchronized tables for a subscription named sub_n1_n2:
SELECT spock.sub_alter_sync('sub_n1_n2', true);