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

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Euler Taveira <euler(at)eulerto(dot)com>
Cc: Paul Martinez <paulmtz(at)google(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] pg_hba.conf error messages for logical replication connections
Date: 2021-02-20 10:33:22
Message-ID: CAA4eK1LQ2JSqyjy18XDxfKkSv83gq+pyZb9FyKv8VkODnwSZmA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Feb 18, 2021 at 2:42 PM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>
> On Thu, Feb 18, 2021 at 5:59 AM Euler Taveira <euler(at)eulerto(dot)com> wrote:
> >
> > On Wed, Feb 17, 2021, at 8:01 AM, Amit Kapila wrote:
> >
> > Before fix
> > ERROR: could not connect to the publisher: connection to server at
> > "localhost" (::1), port 5432 failed: FATAL: pg_hba.conf rejects
> > replication connection for host "::1", user "KapilaAm", no encryption
> >
> > After fix error:
> > ERROR: could not connect to the publisher: connection to server at
> > "localhost" (::1), port 5432 failed: FATAL: pg_hba.conf rejects
> > connection for host "::1", user "KapilaAm", database "postgres", no
> > encryption
> > DETAIL: Logical replication connections do not match pg_hba.conf
> > rules using the "replication" keyword.
> >
> > The new message is certainly an improvement because it provides an additional
> > component (database name) that could be used to figure out what's wrong with
> > the logical replication connection. However, I wouldn't like to add a DETAIL
> > message for something that could be easily inspected in the pg_hba.conf. The
> > old message leaves a doubt about which rule was used (absence of database name)
> > but the new message makes this very clear. IMO with this new message, we don't
> > need a DETAIL message.
> >
>
> You have a point. Paul, do you have any thoughts on this?
>

Changed as per suggestion.

> > If in doubt, user can always read that documentation
> > (the new sentence clarifies the "replication" usage for logical replication
> > connections).
> >
> > Regarding the documentation, I think the new sentence a bit confusing. The
> > modified sentence is providing detailed information about "replication" in the
> > database field then you start mentioned "replication=database". Even though it
> > is related to the connection string, it could confuse the reader for a second.
> > I would say "it does not match logical replication connections". It seems
> > sufficient to inform the reader that he/she cannot use records with
> > "replication" to match logical replication connections.
> >
>
> Fair point.
>

I have used a bit of different wording here to make things clear.

Let me know what you think of the attached?

--
With Regards,
Amit Kapila.

Attachment Content-Type Size
pg_hba_conf_error_message_patch_v04.patch application/octet-stream 2.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dilip Kumar 2021-02-20 10:46:48 Re: [HACKERS] Custom compression methods
Previous Message Amit Kapila 2021-02-20 09:28:05 Re: repeated decoding of prepared transactions