Restrict "node_name" to maximum 63 characters

In "recovery.conf", the configuration parameter "node_name" is used
as the "application_name" value, which will be truncated by PostgreSQL
to 63 characters (NAMEDATALEN - 1).

repmgr sometimes needs to be able to extract the application name from
pg_stat_replication to determine if a node is connected (e.g. when
executing "repmgr standby register"), so the comparison will fail
if "node_name" exceeds 63 characters.
This commit is contained in:
Ian Barwick
2019-03-28 10:37:57 +09:00
parent 73ad689390
commit ba1f05ece9
11 changed files with 42 additions and 22 deletions

View File

@@ -28,6 +28,7 @@
# node's current role, e.g. 'primary' or 'standby1',
# as roles can change and it will be confusing if
# the current primary is called 'standby1'.
# Maximum length is 63 characters.
#conninfo='' # Database connection information as a conninfo string.
# All servers in the cluster must be able to connect to