SET ADD TABLE

Name

SET ADD TABLE --  Add a table to a edb-async-replic replication set

Synopsis

SET ADD TABLE (options);

Description

Add an existing user table to a replication set. The set cannot currently be subscribed by any other node - that functionality is supported by the MERGE SET command.

SET ID = ival

ID of the set to which the table is to be added.

ORIGIN = ival

Origin node for the set. A future version of slonik might figure out this information by itself.

ID = ival

Unique ID of the table. These ID's are not only used to uniquely identify the individual table within the replication system. The numeric value of this ID also determines the order in which the tables are locked in a LOCK SET command for example. So these numbers should represent any applicable table hierarchy to make sure the slonik command scripts do not deadlock at any critical moment.

FULLY QUALIFIED NAME = 'string'

The full table name as described in TABLE ADD KEY.

KEY = { 'string' | SERIAL }

(Optional) The index name that covers the unique and not null column set to be used as the row identifier for replication purposes. Or the keyword SERIAL to use the special column added with a previous TABLE ADD KEY command. Default is to use the table's primary key. The index name is not fully qualified; you must omit the namespace.

COMMENT = 'string'

A descriptive text added to the table entry.

Example

SET ADD TABLE (
    SET ID = 1,
    ORIGIN = 1,
    ID = 20,
    FULLY QUALIFIED NAME = 'public.tracker_ticket',
    COMMENT = 'Support ticket'
);