Re: Proposal: new file format for hba/ident/hosts configuration? - Mailing list pgsql-hackers

From Greg Sabino Mullane
Subject Re: Proposal: new file format for hba/ident/hosts configuration?
Date
Msg-id CAKAnmmJPg=FiD5o3xzXg3Em8o+kras8pHHwsp4VotZ1jreh3Ug@mail.gmail.com
Whole thread
In response to Re: Proposal: new file format for hba/ident/hosts configuration?  (Zsolt Parragi <zsolt.parragi@percona.com>)
List pgsql-hackers
On Wed, Jul 8, 2026 at 11:42 AM Zsolt Parragi <zsolt.parragi@percona.com> wrote:
In pg_hba, we already have a way too long "options" column at the end,
where we store most of the details about external auth providers. If
an editor doesn't add line breaks, a significant part of the
configuration is invisible without scrolling right.

But we support backslashes, so there is no need to squash everything onto a single line, e.g.

host  all  all  127.0.0.1/32  ldap \
  ldapserver=localhost \
  ldapbinddn="CN=admin,DC=testy,DC=com" \
  ldapbindpasswd="mysecretpass" \
  ldapbasedn="OU=Users,DC=testy,DC=com" \
  ldapsearchfilter="(&(uid=$username)(memberOf=CN=pg_admins,OU=Groups,DC=testy,DC=com))"


All in all, I am super wary of this whole idea. Not that pg_hba is pretty, or intuitive, but I second the motion to see what a converted one would look like. Can the proponents of format X show what our standard default pg_hba.conf would look like in the new format?

--
Cheers,
Greg

pgsql-hackers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: Re: libpq: Process buffered SSL read bytes to support records >8kB on async API
Next
From: Masahiko Sawada
Date:
Subject: Re: Per-table resync for logical replication subscriptions