From: | Jacob Champion <jchampion(at)timescale(dot)com> |
---|---|
To: | Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
Cc: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, mahendrakar s <mahendrakarforpg(at)gmail(dot)com>, Andrey Chudnovsky <achudnovskij(at)gmail(dot)com>, "hlinnaka(at)iki(dot)fi" <hlinnaka(at)iki(dot)fi>, "michael(at)paquier(dot)xyz" <michael(at)paquier(dot)xyz>, "smilingsamay(at)gmail(dot)com" <smilingsamay(at)gmail(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net> |
Subject: | Re: [PoC] Federated Authn/z with OAUTHBEARER |
Date: | 2023-07-07 18:48:26 |
Message-ID: | CAAWbhmhBkMMi6vtuG-2NiXKGvzhngbL-bnPVbvrKmOvdKwMhaA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Jul 6, 2023 at 1:48 PM Thomas Munro <thomas(dot)munro(at)gmail(dot)com> wrote:
> On Fri, Jul 7, 2023 at 4:57 AM Jacob Champion <jchampion(at)timescale(dot)com> wrote:
> > Something analogous to libcurl's socket and timeout callbacks [1],
> > then? Or is there an existing libpq API you were thinking about using?
>
> Yeah. Libpq already has an event concept.
Thanks -- I don't know how I never noticed libpq-events.h before.
Per-connection events (or callbacks) might bring up the same
chicken-and-egg situation discussed above, with the notice hook. We'll
be fine as long as PQconnectStart is guaranteed to return before the
PQconnectPoll engine gets to authentication, and it looks like that's
true with today's implementation, which returns pessimistically at
several points instead of just trying to continue the exchange. But I
don't know if that's intended as a guarantee for the future. At the
very least we would have to pin that implementation detail.
> > > Or, more likely in the
> > > first version, you just can't do it at all... Doesn't seem that bad
> > > to me.
> >
> > Any initial opinions on whether it's worse or better than a worker thread?
>
> My vote is that it's perfectly fine to make a new feature that only
> works on some OSes. If/when someone wants to work on getting it going
> on Windows/AIX/Solaris (that's the complete set of no-epoll, no-kqueue
> OSes we target), they can write the patch.
Okay. I'm curious to hear others' thoughts on that, too, if anyone's lurking.
Thanks!
--Jacob
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Munro | 2023-07-07 19:04:59 | Re: 010_database.pl fails on openbsd w/ LC_ALL=LANG=C |
Previous Message | Nathan Bossart | 2023-07-07 18:30:59 | Re: pgsql: Fix search_path to a safe value during maintenance operations. |