pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jacob Champion <jchampion@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: oauth_validator: Avoid races in log_check()
Date: Wed, 17 Dec 2025 20:34:10 +0000
Message-ID: <E1vVyDp-001Iln-1x@gemulon.postgresql.org> (raw)

oauth_validator: Avoid races in log_check()

Commit e0f373ee4 fixed up races in Cluster::connect_fails when using
log_like. t/002_client.pl didn't get the memo, though, because it
doesn't use Test::Cluster to perform its custom hook tests. (This is
probably not an issue at the moment, since the log check is only done
after authentication success and not failure, but there's no reason to
wait for someone to hit it.)

Introduce the fix, based on debug2 logging, to its use of log_check() as
well, and move the logic into the test() helper so that any additions
don't need to continually duplicate it.

Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Discussion: https://postgr.es/m/CAOYmi%2BmrGg%2Bn_X2MOLgeWcj3v_M00gR8uz_D7mM8z%3DdX1JYVbg%40mail.gmail.com
Backpatch-through: 18

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/ab8af1db43031544a5c01314bef9f0392bfde7f9

Modified Files
--------------
src/test/modules/oauth_validator/t/002_client.pl | 24 ++++++++++++++++++------
1 file changed, 18 insertions(+), 6 deletions(-)



view thread (2+ messages)  latest in thread

Message-ID: <E1vVyDp-001Iln-1x@gemulon.postgresql.org>
Permalink:  ../E1vVyDp-001Iln-1x@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1vVyDp-001Iln-1x@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: jchampion@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: oauth_validator: Avoid races in log_check()
  In-Reply-To: <E1vVyDp-001Iln-1x@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox