aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAmit Kapila <akapila@postgresql.org>2021-02-23 09:11:22 +0530
committerAmit Kapila <akapila@postgresql.org>2021-02-23 09:11:22 +0530
commitbc617a7b1cada2ec5f8b9d45a4312e49fc1766ad (patch)
tree8af376792abb156d1f60c0b00a982a416385f2e3 /src
parent0f5505a8815aa4eb03ca61245a5a51ff9adda2f4 (diff)
downloadpostgresql-bc617a7b1cada2ec5f8b9d45a4312e49fc1766ad.tar.gz
postgresql-bc617a7b1cada2ec5f8b9d45a4312e49fc1766ad.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/backend/libpq/auth.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/libpq/auth.c b/src/backend/libpq/auth.c
index 545635f41a9..baa0712c0f7 100644
--- a/src/backend/libpq/auth.c
+++ b/src/backend/libpq/auth.c
@@ -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 */