Re: [PATCH] pg_hba.conf error messages for logical replication connections

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Paul Martinez <paulmtz(at)google(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] pg_hba.conf error messages for logical replication connections
Date: 2021-01-29 04:17:06
Message-ID: CAA4eK1J=5sNB9XspkjiZM9jpaio7nZRY7tdZa4=gC-_8g2Ba5A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jan 28, 2021 at 1:51 PM Paul Martinez <paulmtz(at)google(dot)com> wrote:
>
> Hey, all,
>
> When creating a logical replication connection that isn't allowed by the
> current pg_hba.conf, the error message states that a "replication
> connection" is not allowed.
>
> This error message is confusing because although the user is trying to
> create a replication connection and specified "replication=database" in
> the connection string, the special "replication" pg_hba.conf keyword
> does not apply.
>

Right.

> I believe the error message should just refer to a
> regular connection and specify the database the user is trying to
> connect to.
>

What exactly are you bothered about here? Is the database name not
present in the message your concern or the message uses 'replication'
but actually it doesn't relate to 'replication' specified in
pg_hba.conf your concern? I think with the current scheme one might
say that replication word in error message helps them to distinguish
logical replication connection error from a regular connection error.
I am not telling what you are proposing is wrong but just that the
current scheme of things might be helpful to some users. If you can
explain a bit how the current message mislead you and the proposed one
solves that confusion that would be better?

--
With Regards,
Amit Kapila.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Neha Sharma 2021-01-29 04:17:38 Re: [HACKERS] Custom compression methods
Previous Message Jaime Casanova 2021-01-29 02:45:23 Assertion fail with window function and partitioned tables