mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-26 16:46:28 +00:00
repmgr: disallow node ids which are not positive signed 32 bit integers
Fixes GitHub #280
This commit is contained in:
@@ -391,7 +391,8 @@ least the following parameters:
|
|||||||
|
|
||||||
- `cluster`: an arbitrary name for the replication cluster; this must be identical
|
- `cluster`: an arbitrary name for the replication cluster; this must be identical
|
||||||
on all nodes
|
on all nodes
|
||||||
- `node`: a unique integer identifying the node
|
- `node`: a unique integer identifying the node; note this must be a positive
|
||||||
|
32 bit signed integer between 1 and 2147483647
|
||||||
- `node_name`: a unique string identifying the node; we recommend a name
|
- `node_name`: a unique string identifying the node; we recommend a name
|
||||||
specific to the server (e.g. 'server_1'); avoid names indicating the
|
specific to the server (e.g. 'server_1'); avoid names indicating the
|
||||||
current replication role like 'master' or 'standby' as the server's
|
current replication role like 'master' or 'standby' as the server's
|
||||||
|
|||||||
4
config.c
4
config.c
@@ -448,6 +448,10 @@ _parse_config(t_configuration_options *options, ItemList *error_list)
|
|||||||
{
|
{
|
||||||
item_list_append(error_list, _("\"node\": must be greater than zero"));
|
item_list_append(error_list, _("\"node\": must be greater than zero"));
|
||||||
}
|
}
|
||||||
|
else if (options->node < 0)
|
||||||
|
{
|
||||||
|
item_list_append(error_list, _("\"node\": must be a positive signed 32 bit integer, i.e. 2147483647 or less"));
|
||||||
|
}
|
||||||
|
|
||||||
if (strlen(options->conninfo))
|
if (strlen(options->conninfo))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user