pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: oauth: Track total call count during a client flow
2+ messages / 1 participants
[nested] [flat]

* pgsql: oauth: Track total call count during a client flow
@ 2025-08-08 16:07 Jacob Champion <jchampion@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Jacob Champion @ 2025-08-08 16:07 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

oauth: Track total call count during a client flow

Tracking down the bugs that led to the addition of comb_multiplexer()
and drain_timer_events() was difficult, because an inefficient flow is
not visibly different from one that is working properly. To help
maintainers notice when something has gone wrong, track the number of
calls into the flow as part of debug mode, and print the total when the
flow finishes.

A new test makes sure the total count is less than 100. (We expect
something on the order of 10.) This isn't foolproof, but it is able to
catch several regressions in the logic of the prior two commits, and
future work to add TLS support to the oauth_validator test server should
strengthen it as well.

Backpatch-through: 18
Discussion: https://postgr.es/m/CAOYmi+nDZxJHaWj9_jRSyf8uMToCADAmOfJEggsKW-kY7aUwHA@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/3e311664e4974ea0eef708d54256aacbb0239c95

Modified Files
--------------
src/interfaces/libpq-oauth/oauth-curl.c          | 22 +++++++++++++++++
src/test/modules/oauth_validator/t/001_server.pl | 31 +++++++++++++++++++++++-
2 files changed, 52 insertions(+), 1 deletion(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: oauth: Track total call count during a client flow
@ 2025-08-08 16:07 Jacob Champion <jchampion@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Jacob Champion @ 2025-08-08 16:07 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

oauth: Track total call count during a client flow

Tracking down the bugs that led to the addition of comb_multiplexer()
and drain_timer_events() was difficult, because an inefficient flow is
not visibly different from one that is working properly. To help
maintainers notice when something has gone wrong, track the number of
calls into the flow as part of debug mode, and print the total when the
flow finishes.

A new test makes sure the total count is less than 100. (We expect
something on the order of 10.) This isn't foolproof, but it is able to
catch several regressions in the logic of the prior two commits, and
future work to add TLS support to the oauth_validator test server should
strengthen it as well.

Backpatch-through: 18
Discussion: https://postgr.es/m/CAOYmi+nDZxJHaWj9_jRSyf8uMToCADAmOfJEggsKW-kY7aUwHA@mail.gmail.com

Branch
------
REL_18_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/41aac1483a6ce61c0a721c590caaaaaf838eae47

Modified Files
--------------
src/interfaces/libpq-oauth/oauth-curl.c          | 22 +++++++++++++++++
src/test/modules/oauth_validator/t/001_server.pl | 31 +++++++++++++++++++++++-
2 files changed, 52 insertions(+), 1 deletion(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2025-08-08 16:07 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-08-08 16:07 pgsql: oauth: Track total call count during a client flow Jacob Champion <jchampion@postgresql.org>
2025-08-08 16:07 pgsql: oauth: Track total call count during a client flow Jacob Champion <jchampion@postgresql.org>

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