Re: Add ldapservice connection parameter

From: Andrew Jackson <andrewjackson947(at)gmail(dot)com>
To: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Roman Khapov <rkhapov(at)yandex-team(dot)ru>, niushiji(at)gmail(dot)com
Subject: Re: Add ldapservice connection parameter
Date: 2026-04-01 23:07:47
Message-ID: CAKK5BkET2pxuuSvp5ZLsH=LLYS+6JCB+zUAhY38vWsGNJrN6eA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Attached is an updated patch.

> I think there should be more tests for failure.

This is fixed. I have added a new suite of tests that cover various
(but not exhaustive) failure scenarios within ldapServiceLookup. Prior
to this patch there were no tests for failure within ldapServiceLookup
so I think it's an improvement.

I have also added 5 additional tests to validate corner cases around
the new ldapserviceurl functionality.

> Good, but you should append something to the "errorMessage", like
conninfo_add_defaults() does elsewhere.

Added an error append in this patch. It has the impact of printing 2
lines of errors on failure though: one from the newly appended message
and one from ldapServiceLookup. Not sure if there are other examples
of this behavior in libpq. Will look into this more tommorow.

> About the tests: there is one test "connection fails with ldapserviceurl specified in pg_service.conf file", but it doesn't look like it is doing what it says.

You are correct, this test was incorrect. All of the tests should now
have expected_stdout/stderr conditions so they should be a lot more
precise now.

> The version number of the patches should be before that, like v5-0001-First-patch-version-5.patch

Understood. All future patches will be attached in this manner.

> I think it is confusing to repurpose an existing parameter like that.

Understood. Will stick to the idea of using a new connection parameter.

Thanks,
Andrew Jackson

Attachment Content-Type Size
v6-0001-Add-ldapservice-connection-parameter.patch text/x-patch 18.9 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2026-04-01 23:15:33 Re: POC: Parallel processing of indexes in autovacuum
Previous Message Sami Imseih 2026-04-01 23:04:36 Re: Add pg_stat_autovacuum_priority