Add some annotations

This commit is contained in:
Ian Barwick
2015-03-04 10:36:19 +09:00
parent 7ae4434f6e
commit defb1e819b
2 changed files with 15 additions and 1 deletions

View File

@@ -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)
{

View File

@@ -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);