Re: [OAuth2] Infrastructure for tracking token expiry time

From: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>
To: Daniel Gustafsson <daniel(at)yesql(dot)se>
Cc: Ajit Awekar <ajitpostgres(at)gmail(dot)com>, VASUKI M <vasukianand0119(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [OAuth2] Infrastructure for tracking token expiry time
Date: 2026-02-18 16:58:58
Message-ID: CAN4CZFMaAvHSBbQ25o=yiWqn=p7jBNUBABZvqoU1x1-7NWPH9Q@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> but I still think that neither should overload
> what FATAL error means

I see, I misunderstood what you meant by graceful there. In this case,
this is also a good comment for the password expiration thread,
currently that also uses FATAL errors for terminating a connection
when the password expires.

What other option do you see? Something new for this use case like
GoAway, and clients not understanding it simply get disconnected after
some grace period? Or using the recently merged connectionWarning to
send a warning to the client, and disconnect it shortly if it doesn't
do anything to fix the situation?

When I tested the password expiration patch I noticed that deleted
users who still have remaining active connections currently get ERRORs
for every statement that requires permission checks, so in this regard
using ERROR/FATAL for the situation seemed fine to me - it's similar
to what already happens in some edge cases with authentication.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andreas Karlsson 2026-02-18 17:19:57 Re: Use LOCKMODE in parse_relation.c/.h
Previous Message Andres Freund 2026-02-18 16:32:28 Re: Lowering the default wal_blocksize to 4K