Re: Log connection establishment timings

Поиск
Список
Период
Сортировка
От Melanie Plageman
Тема Re: Log connection establishment timings
Дата
Msg-id CAAKRu_a1Uz2WEGq3MgV=oHsuEr+dAGhqLDTC+u6YXPkh_1cJaA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Log connection establishment timings  (Jacob Champion <jacob.champion@enterprisedb.com>)
Ответы Re: Log connection establishment timings
Список pgsql-hackers
On Fri, Mar 7, 2025 at 4:53 PM Jacob Champion
<jacob.champion@enterprisedb.com> wrote:
>
> If I add a hypothetical auth method in the future that authenticates,
> and then farms the authorization decision out to some slow-moving
> network machinery, would "authenticated" retroactively become a stage
> then? (OAuth almost does this today... but it's not quite separated
> enough for me to claim it as an example.) If we call them "options"
> instead, I guess we don't have to worry about shifting internals.

Yea, I could also see people wanting to add other messages in the
future that don't fit perfectly into the "stage" category. Keeping
things more general probably reduces that potential future friction
too.

In v13 that I shared here [1] I refer to them as "options" and, in
some contexts where that doesn't make sense, "aspects" of connection
establishment and backend setup. I also changed the tenses of the
other options from "received", "authenticated", and "authorized" to
"receipt", "authentication", "authorization". I think that makes them
sound less like stages and more like a type of message.

> > That also makes me wonder if the
> > "authenticated" log_connections option should actually be called
> > "auth_id" or something similar.
>
> To bikeshed the specific suggestion of "auth_id": both Peter E and
> Robert have previously expressed concern that my internal name choice
> of "authn_id" was too opaque, and that maybe I should have just
> expanded the terms. Also, I think if one option is called
> "authorized", the other half should probably be called "authenticated"
> if for no other reason than symmetry. It also matches the prefix used
> in the logs, for English builds.

Yea, "auth_id" is too ambiguous for a GUC option. I went with
"authorization" because it sounds a bit less like a stage while also
being a recognizable word. It achieves symmetry -- though it doesn't
match the prefix used in the logs.

- Melanie

[1] https://www.postgresql.org/message-id/CAAKRu_ZVecPK6QU-R_pFrkm6z4OAvE9PQBh1hL_GB8UW0cxTnw%40mail.gmail.com



В списке pgsql-hackers по дате отправления: