mirror of
https://github.com/postgres/postgres.git
synced 2025-07-26 01:22:12 +03:00
Change the error message for logical replication authentication failure.
The authentication failure error message wasn't distinguishing whether it is a physical replication or logical replication connection failure and was giving incomplete information on what led to failure in case of logical replication connection. Author: Paul Martinez and Amit Kapila Reviewed-by: Euler Taveira and Amit Kapila Discussion: https://postgr.es/m/CACqFVBYahrAi2OPdJfUA3YCvn3QMzzxZdw0ibSJ8wouWeDtiyQ@mail.gmail.com
This commit is contained in:
@ -417,7 +417,7 @@ ClientAuthentication(Port *port)
|
||||
#endif
|
||||
_("no encryption");
|
||||
|
||||
if (am_walsender)
|
||||
if (am_walsender && !am_db_walsender)
|
||||
ereport(FATAL,
|
||||
(errcode(ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION),
|
||||
/* translator: last %s describes encryption state */
|
||||
@ -484,7 +484,7 @@ ClientAuthentication(Port *port)
|
||||
gai_strerror(port->remote_hostname_errcode)) : \
|
||||
0))
|
||||
|
||||
if (am_walsender)
|
||||
if (am_walsender && !am_db_walsender)
|
||||
ereport(FATAL,
|
||||
(errcode(ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION),
|
||||
/* translator: last %s describes encryption state */
|
||||
|
Reference in New Issue
Block a user