Subject: Re: Custom oauth validator options

From: Zsolt Parragi <[email-masked]>
Date: Wed, 28 Jan 2026 19:21:13 +0000

> but I wonder if this is something we
> should attempt in the context of the larger refactoring done by the
> patch series here,

That patch series is interesting but it is about SQL (table, index,
operator) options, while this is about guc variable validation and
extension. These seem unrelated to me.

---

From: Nikolay Shaplov <[email-masked]>
Date: Thu, 29 Jan 2026 14:58:52 +0300

> extension. These seem unrelated to me.

This patch suggests context independent API for managing extension 
defined sets of options. It is used for
relation options and similar options, but cat be also used for any 
options sets, may be with small modifications.

GUC options are almost same options as relation options. That is why, I 
guess, Alvaro suggested you to look at this patch.

And I agree with him. Please have a look at 
src/backend/access/common/options.c in that patch. I almost sure this 
code can be reused for GUC options too.

Whole https://commitfest.postgresql.org/patch/4688/ is a bit outdated, 
and need rebase, but options.c from it is as good as it was before.

And we've just recently committed a small fix that have been blocking 
4688's patch rebase. I have plans to rebase it in not so distant future.

It you find it useful for your tasks and even would like to join to 
review (at least for options.c part) I would do it with higher priority.
(but it is still my weekend-days project, so it can't be extremely fast)

---

From: Zsolt Parragi <[email-masked]>
Date: Thu, 29 Jan 2026 13:00:57 +0000

> guess, Alvaro suggested you to look at this patch.

Yes, but wouldn't that still require a generic refactoring of GUCs?
I'm not saying that would be a bad thing, but that's a big task in
itself.

But if I think about it in the general context of this thread (adding
extension options to pg_hba, ignoring the part that I tried to
implement it with GUCs in the current patch), that can be related.

Thanks for the clarification, I'll look into it in more detail.