@@ -218,28 +218,17 @@ PerformAuthentication(Port *port)
218218if (!disable_sig_alarm (true))
219219elog (FATAL ,"could not disable timer for authorization timeout" );
220220
221- /*
222- * Log connection for streaming replication even if Log_connections
223- * disabled.
224- */
225- if (am_walsender )
221+ if (Log_connections )
226222{
227- if (port -> remote_port [ 0 ] )
223+ if (am_walsender )
228224ereport (LOG ,
229- (errmsg ("replication connection authorized: user=%s host=%s port=%s" ,
230- port -> user_name ,
231- port -> remote_host ,
232- port -> remote_port )));
225+ (errmsg ("replication connection authorized: user=%s" ,
226+ port -> user_name )));
233227else
234228ereport (LOG ,
235- (errmsg ("replication connection authorized: user=%s host=%s" ,
236- port -> user_name ,
237- port -> remote_host )));
229+ (errmsg ("connection authorized: user=%s database=%s" ,
230+ port -> user_name ,port -> database_name )));
238231}
239- else if (Log_connections )
240- ereport (LOG ,
241- (errmsg ("connection authorized: user=%s database=%s" ,
242- port -> user_name ,port -> database_name )));
243232
244233set_ps_display ("startup" , false);
245234