Bucardo/tables/bucardo.sync

From Bucardo

Jump to: navigation, search

Table: bucardo.sync

Defines a single replication event from a herd to one or more target databases
ColumnTypeNotes
name TEXT NOT NULL UNIQUE
source TEXT NOT NULL
targetdb TEXT NULL
targetgroup TEXT NULL
synctype TEXT NOT NULL
stayalive BOOLEAN NOT NULL DEFAULT 'true'
kidsalive BOOLEAN NOT NULL DEFAULT 'true'
usecustomselect BOOLEAN NOT NULL DEFAULT 'false'
copytype TEXT NOT NULL DEFAULT 'copy'
copyextra TEXT NOT NULL DEFAULT ''
deletemethod TEXT NOT NULL DEFAULT 'delete'
limitdbs SMALLINT NOT NULL DEFAULT 0
ping BOOLEAN NOT NULL DEFAULT true
do_listen BOOLEAN NOT NULL DEFAULT false
checktime INTERVAL NULL
status TEXT NOT NULL DEFAULT 'active'
source_makedelta ONOFF NOT NULL DEFAULT 'inherits'
target_makedelta ONOFF NOT NULL DEFAULT 'inherits'
rebuild_index SMALLINT NOT NULL DEFAULT 0
priority SMALLINT NOT NULL DEFAULT 0
txnmode TEXT NOT NULL DEFAULT 'SERIALIZABLE'
analyze_after_copy BOOLEAN NOT NULL DEFAULT 'true'
strict_checking BOOLEAN NOT NULL DEFAULT 'true'
overdue INTERVAL NOT NULL DEFAULT '0 seconds'::interval
expired INTERVAL NOT NULL DEFAULT '0 seconds'::interval
track_rates BOOLEAN NOT NULL DEFAULT 'false'
onetimecopy SMALLINT NOT NULL DEFAULT 0
lifetime INTERVAL NULL
maxkicks INTEGER NOT NULL DEFAULT 0
cdate TIMESTAMPTZ NOT NULL DEFAULT now()
ConstraintDefinition
sync_name_pkPRIMARY KEY (name)
sync_source_herd_fkFOREIGN KEY (source) REFERENCES bucardo.herd(name) ON UPDATE CASCADE ON DELETE RESTRICT
sync_targetdb_fkFOREIGN KEY (targetdb) REFERENCES bucardo.db(name) ON UPDATE CASCADE ON DELETE RESTRICT
sync_targetgroup_fkFOREIGN KEY (targetgroup) REFERENCES bucardo.dbgroup(name) ON UPDATE CASCADE ON DELETE RESTRICT
sync_typeCHECK (synctype IN ('pushdelta','fullcopy','swap'))
sync_copytypeCHECK (copytype IN ('insert','copy'))
sync_deletemethodCHECK (deletemethod IN ('truncate', 'delete', 'truncate_cascade'))
sync_validtargetCHECK (((targetdb IS NULL) AND (targetgroup IS NOT NULL)) OR ((targetdb IS NOT NULL) AND (targetgroup IS NULL)))
sync_swap_nogroupCHECK (synctype <> 'swap' OR targetdb IS NOT NULL)
IndexUnique?Definition
sync_source_targetdb_typeYes(source, targetdb, synctype)
sync_source_targetgroup_typeYes(source, targetgroup, synctype)
Personal tools