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:
parent
0f5505a881
commit
bc617a7b1c
@ -229,8 +229,10 @@ hostnogssenc <replaceable>database</replaceable> <replaceable>user</replaceabl
|
|||||||
members of the role, directly or indirectly, and not just by
|
members of the role, directly or indirectly, and not just by
|
||||||
virtue of being a superuser.
|
virtue of being a superuser.
|
||||||
The value <literal>replication</literal> specifies that the record
|
The value <literal>replication</literal> specifies that the record
|
||||||
matches if a physical replication connection is requested (note that
|
matches if a physical replication connection is requested, however, it
|
||||||
replication connections do not specify any particular database).
|
doesn't match with logical replication connections. Note that physical
|
||||||
|
replication connections do not specify any particular database whereas
|
||||||
|
logical replication connections do specify it.
|
||||||
Otherwise, this is the name of
|
Otherwise, this is the name of
|
||||||
a specific <productname>PostgreSQL</productname> database.
|
a specific <productname>PostgreSQL</productname> database.
|
||||||
Multiple database names can be supplied by separating them with
|
Multiple database names can be supplied by separating them with
|
||||||
|
@ -417,7 +417,7 @@ ClientAuthentication(Port *port)
|
|||||||
#endif
|
#endif
|
||||||
_("no encryption");
|
_("no encryption");
|
||||||
|
|
||||||
if (am_walsender)
|
if (am_walsender && !am_db_walsender)
|
||||||
ereport(FATAL,
|
ereport(FATAL,
|
||||||
(errcode(ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION),
|
(errcode(ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION),
|
||||||
/* translator: last %s describes encryption state */
|
/* translator: last %s describes encryption state */
|
||||||
@ -484,7 +484,7 @@ ClientAuthentication(Port *port)
|
|||||||
gai_strerror(port->remote_hostname_errcode)) : \
|
gai_strerror(port->remote_hostname_errcode)) : \
|
||||||
0))
|
0))
|
||||||
|
|
||||||
if (am_walsender)
|
if (am_walsender && !am_db_walsender)
|
||||||
ereport(FATAL,
|
ereport(FATAL,
|
||||||
(errcode(ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION),
|
(errcode(ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION),
|
||||||
/* translator: last %s describes encryption state */
|
/* translator: last %s describes encryption state */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user