diff --git a/dbutils.c b/dbutils.c index 4f81ed4e..67259ed8 100644 --- a/dbutils.c +++ b/dbutils.c @@ -906,6 +906,14 @@ copy_configuration(PGconn *masterconn, PGconn *witnessconn, char *cluster_name) return true; } + +/* + * create_node_record() + * + * Create an entry in the `repl_nodes` table. + * + * XXX we should pass the record parameters as a struct. + */ bool create_node_record(PGconn *conn, char *action, int node, char *type, int upstream_node, char *cluster_name, char *node_name, char *conninfo, int priority, char *slot_name) { diff --git a/repmgr.c b/repmgr.c index 4fe353b7..1761a52e 100644 --- a/repmgr.c +++ b/repmgr.c @@ -500,7 +500,13 @@ main(int argc, char **argv) maxlen_snprintf(repmgr_schema, "%s%s", DEFAULT_REPMGR_SCHEMA_PREFIX, options.cluster_name); - /* Initialise slot name, if required (9.4 and later) */ + /* + * Initialise slot name, if required (9.4 and later) + * + * NOTE: the slot name will be defined for each record, including + * the master; the `slot_name` column in `repl_nodes` defines + * the name of the slot, but does not imply a slot has been created. + */ if(options.use_replication_slots) { maxlen_snprintf(repmgr_slot_name, "repmgr_slot_%i", options.node);