BUG #19514: pg_hba error when configuring SSL Replication - Mailing list pgsql-bugs

From PG Bug reporting form
Subject BUG #19514: pg_hba error when configuring SSL Replication
Date
Msg-id 19514-4be18364656609a4@postgresql.org
Whole thread
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      19514
Logged by:          Marijo Kristo
Email address:      marijo.kristo@icloud.com
PostgreSQL version: 18.4
Operating system:   Debian trixie
Description:

Hello,

I have Barman installed on a seperate VM and I am trying to configure the
Postgres Server, which is behind a TLS SNI Aware Proxy.
Normal PSQL Connections are working, but I get an error message when I
configure barman with the following streaming_conn_info:

streaming_conninfo = host=pgctest01-rw.dbms.development.cloud.internal
user=postgres dbname=postgres sslmode=require sslnegotiation=direct

 pg_hba:
   - hostssl all all 0.0.0.0/0 scram-sha-256
   - hostssl replication postgres 0.0.0.0/0 scram-sha-256

Error Message:
2026-06-08 13:51:48,496 [318870] barman.postgres WARNING: Error retrieving
PostgreSQL status: connection to server at
"pgctest01-rw.dbms.development.cloud.internal" (10.101.14.225), port 5432
failed: FATAL:  no pg_hba.conf entry for replication connection from host
"240.13.11.16", user "postgres", no encryption

When I adjust the pg_hba to following configuration I dont get any error
messages anymore and the connection seems to be encrypted when inspecting
the interface via tcpdump.
Can someone explain me why I am getting this error message even when I force
sslmode and sslnegotiation ?

pg_hba:
  - hostssl all all 0.0.0.0/0 scram-sha-256
  - host replication postgres 0.0.0.0/0 scram-sha-256

Best Regards
Marijo





pgsql-bugs by date:

Previous
From: Xuneng Zhou
Date:
Subject: Re: BUG #18158: Assert in pgstat_report_stat() fails when a backend shutting down with stats pending
Next
From: "Hayato Kuroda (Fujitsu)"
Date:
Subject: RE: Logical replication initialization time depends dramatically on the publication "schema" size