When a t_node_info struct must be re initilised, it was re-declared
only. Moreover, a macro was user for any var creation of this type
impeding use the same to reset the values later if needed.
This new function allows to re initilise again a t_node_info typed
variable without the need to redeclare it to create other varibles for
the same purpose, and also shadowing is now avoided from pg16.
Macros seems to be replaced by `static inline` functions in upstream
postgres, credits to Alvaro Herrera <alvherre@alvh.no-ip.org> for this
idea.
References: HL-40
Previously query texts were always logged at log level DEBUG, but
that doesn't help much in a normal production environment when
trying to identify the cause of issues.
Also make various other minor improvements to query logging and
handling of database errors.
Implements GitHub #498.
This previously happened in the extension SQL code, which could
potentially cause replay problems if installing on a BDR cluster.
As this table is only required for streaming replication failover,
move the initialisation to "repmgr primary register".
Addresses GitHub #344 .
There are now too many options to sensibly fit into general --help
output; we'll add separate output for each repmgr command, e.g.
"repmgr node --help".
For logging an event to the event table without generating an external
event notification.
Rename existing create_event_record*() functions to create_event_notification*()
as this describes their function better.
This is only relevant when cloning a standby and the node's upstream
can change after failover/switchover etc., so no point keeping the
original value around in the configuration file.