application_name setting of the standby, as set in the
standby's connection information. In case of a physical replication
standby, this should be set in the primary_conninfo
- setting; the default is walreceiver.
+ setting; the default is the setting of
+ if set, else walreceiver.
For logical replication, this can be set in the connection
information of the subscription, and it defaults to the
subscription name. For other replication stream consumers,
- Sets the cluster name that appears in the process title for all
- server processes in this cluster. The name can be any string of less
+ Sets a name that identifies this database cluster (instance) for
+ various purposes. The cluster name appears in the process title for
+ all server processes in this cluster. Moreover, it is the default
+ application name for a standby connection (see
+ linkend="guc-synchronous-standby-names"/>.)
+
+
+ The name can be any string of less
than NAMEDATALEN characters (64 characters in a standard
build). Only printable ASCII characters may be used in the
cluster_name value. Other characters will be
/* Establish the connection to the primary for XLOG streaming */
EnableWalRcvImmediateExit();
- wrconn = walrcv_connect(conninfo, false, "walreceiver", &err);
+ wrconn = walrcv_connect(conninfo, false, cluster_name[0] ? cluster_name : "walreceiver", &err);
if (!wrconn)
ereport(ERROR,
(errmsg("could not connect to the primary server: %s", err)));