mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-22 22:56:29 +00:00
repmgrd: minor tweaks to witness node synchronisation
Explicitly roll back if any operation fails, and add debugging output to track elapsed time between synchronisation intervals.
This commit is contained in:
14
dbutils.c
14
dbutils.c
@@ -3552,11 +3552,21 @@ witness_copy_node_records(PGconn *primary_conn, PGconn *witness_conn)
|
||||
return false;
|
||||
}
|
||||
|
||||
get_all_node_records(primary_conn, &nodes);
|
||||
if (get_all_node_records(primary_conn, &nodes) == false)
|
||||
{
|
||||
rollback_transaction(witness_conn);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
for (cell = nodes.head; cell; cell = cell->next)
|
||||
{
|
||||
create_node_record(witness_conn, NULL, cell->node_info);
|
||||
if (create_node_record(witness_conn, NULL, cell->node_info) == false)
|
||||
{
|
||||
rollback_transaction(witness_conn);
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/* and done */
|
||||
|
||||
Reference in New Issue
Block a user