Log replication connections only when log_connections is on
Previously we'd always log replication connections, with no way to turn them off.
This commit is contained in:
parent
b1dc45c11d
commit
6e1726d082
@ -218,28 +218,17 @@ PerformAuthentication(Port *port)
|
|||||||
if (!disable_sig_alarm(true))
|
if (!disable_sig_alarm(true))
|
||||||
elog(FATAL, "could not disable timer for authorization timeout");
|
elog(FATAL, "could not disable timer for authorization timeout");
|
||||||
|
|
||||||
/*
|
if (Log_connections)
|
||||||
* Log connection for streaming replication even if Log_connections
|
|
||||||
* disabled.
|
|
||||||
*/
|
|
||||||
if (am_walsender)
|
|
||||||
{
|
{
|
||||||
if (port->remote_port[0])
|
if (am_walsender)
|
||||||
ereport(LOG,
|
ereport(LOG,
|
||||||
(errmsg("replication connection authorized: user=%s host=%s port=%s",
|
(errmsg("replication connection authorized: user=%s",
|
||||||
port->user_name,
|
port->user_name)));
|
||||||
port->remote_host,
|
|
||||||
port->remote_port)));
|
|
||||||
else
|
else
|
||||||
ereport(LOG,
|
ereport(LOG,
|
||||||
(errmsg("replication connection authorized: user=%s host=%s",
|
(errmsg("connection authorized: user=%s database=%s",
|
||||||
port->user_name,
|
port->user_name, port->database_name)));
|
||||||
port->remote_host)));
|
|
||||||
}
|
}
|
||||||
else if (Log_connections)
|
|
||||||
ereport(LOG,
|
|
||||||
(errmsg("connection authorized: user=%s database=%s",
|
|
||||||
port->user_name, port->database_name)));
|
|
||||||
|
|
||||||
set_ps_display("startup", false);
|
set_ps_display("startup", false);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user