Re: Improve OAuth discovery logging

From: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>
To: Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com>
Cc: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, Andrey Borodin <x4mmm(at)yandex-team(dot)ru>, Daniel Gustafsson <daniel(at)yesql(dot)se>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Michael Paquier <michael(at)paquier(dot)xyz>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: Improve OAuth discovery logging
Date: 2026-03-17 21:19:07
Message-ID: CAN4CZFO-asVDRLBXKZpbYeQh1dKKVHR6i_oHSrbuzfBu0v1Cyw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> That's not really true, because the caller hardcodes the mechanism
> descriptor.

I meant that the caller shouldn't depend on the implementation details
of the mechanism. The abandoned comment says that '"Abandoned" is a
SASL-specific state similar to STATUS_EOF ...', yet later it also
depends on an implementation detail of which sasl mechanism actually
use it.

> (If more things than OAuth need this eventually, maybe it becomes
> STATUS_SILENT_ERROR or something, to make it even more generic?)

That's a good idea, better than my error level suggestion. The code
would actually shorter, because you could remove the programmer error
check from CheckSASLAuth. The diff also, because it would work without
modifying the calls to it.

The patch is also good as-is, all these comments in the last few
messages are just very minor details, I probably spent way too much
time thinging about how to make this not oauth specific in the generic
part of the code.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2026-03-17 21:19:49 Re: Need help debugging SIGBUS crashes
Previous Message Andres Freund 2026-03-17 21:09:49 Re: table AM option passing