Skip to content

pglogical to Spock function names

Spock's function names are shorter than pglogical's, so a cluster or a script being ported from pglogical 2 needs almost every call renamed. This page maps each pglogical function to its Spock equivalent.

Verified against pglogical 2.4.8 and Spock 6.0.0. Where a Spock function has a reference page, its name links to it.

Nodes

pglogical 2.4 Spock 6.0
pglogical.create_node() spock.node_create()
pglogical.drop_node() spock.node_drop()
pglogical.alter_node_add_interface() spock.node_add_interface()
pglogical.alter_node_drop_interface() spock.node_drop_interface()
pglogical.pglogical_node_info() spock.node_info()

Subscriptions

pglogical 2.4 Spock 6.0
pglogical.create_subscription() spock.sub_create()
pglogical.drop_subscription() spock.sub_drop()
pglogical.alter_subscription_interface() spock.sub_alter_interface()
pglogical.alter_subscription_disable() spock.sub_disable()
pglogical.alter_subscription_enable() spock.sub_enable()
pglogical.alter_subscription_add_replication_set() spock.sub_add_repset()
pglogical.alter_subscription_remove_replication_set() spock.sub_remove_repset()
pglogical.show_subscription_status() spock.sub_show_status()
pglogical.show_subscription_table() spock.sub_show_table()

Replication sets

pglogical 2.4 Spock 6.0
pglogical.create_replication_set() spock.repset_create()
pglogical.alter_replication_set() spock.repset_alter()
pglogical.drop_replication_set() spock.repset_drop()
pglogical.replication_set_add_table() spock.repset_add_table()
pglogical.replication_set_add_all_tables() spock.repset_add_all_tables()
pglogical.replication_set_remove_table() spock.repset_remove_table()
pglogical.replication_set_add_sequence() spock.repset_add_seq()
pglogical.replication_set_add_all_sequences() spock.repset_add_all_seqs()
pglogical.replication_set_remove_sequence() spock.repset_remove_seq()
pglogical.show_repset_table_info() spock.repset_show_table()

Synchronisation

pglogical 2.4 Spock 6.0
pglogical.alter_subscription_synchronize() spock.sub_alter_sync()
pglogical.alter_subscription_resynchronize_table() spock.sub_resync_table()
pglogical.synchronize_sequence() spock.sync_seq()
pglogical.wait_for_subscription_sync_complete() spock.sub_wait_for_sync()
pglogical.wait_for_table_sync_complete() spock.table_wait_for_sync()
pglogical.wait_slot_confirm_lsn() spock.wait_slot_confirm_lsn()

DDL, utilities and version information

pglogical 2.4 Spock 6.0
pglogical.replicate_ddl_command() spock.replicate_ddl()
pglogical.table_data_filtered() spock.table_data_filtered()
pglogical.xact_commit_timestamp_origin() spock.xact_commit_timestamp_origin()
pglogical.pglogical_gen_slot_name() spock.spock_gen_slot_name()
pglogical_version() spock.spock_version()
pglogical_version_num() spock.spock_version_num()
pglogical_max_proto_version() spock.spock_max_proto_version()
pglogical_min_proto_version() spock.spock_min_proto_version()

Functions with no Spock equivalent

pglogical.queue_truncate() has no counterpart. Spock controls whether TRUNCATE replicates with the replication set's replicate_truncate option, set with spock.repset_create() or spock.repset_alter(), rather than with a function call.

Spock functions with no pglogical ancestor

Spock adds functions that pglogical never had, so a port is not finished when the last name in the table above has been changed. See the function list for the full set; the additions include spock.sync_event(), spock.wait_for_sync_event(), spock.repset_add_partition(), spock.sub_alter_options() and spock.sub_alter_skiplsn().