From 380a8b2ea024c33a35e7abc8628e7c4f52f9f9f9 Mon Sep 17 00:00:00 2001 From: Jacob Champion Date: Fri, 29 May 2026 14:39:03 -0700 Subject: [PATCH] doc: Correct the timeline for OAuth's shutdown_cb During original feature development, the OAuth validator shutdown callback was invoked via before_shmem_exit(). That was changed to use a reset callback before commit, but I forgot to update the documentation for validator developers. Correct this and backport to 18, where OAuth was introduced. The callback is invoked whenever the server is "finished" with token validation. (We make no stronger guarantees here, in the hopes that this API might successfully navigate future multifactor authentication support and/or changes to the server threading model.) Reported-by: Zsolt Parragi Reviewed-by: Zsolt Parragi Reviewed-by: Chao Li Discussion: https://postgr.es/m/CAN4CZFOuMb_gnLvCwRdMybg_k8WRNJTjcij%2BPoQkuQHDUzxGWg%40mail.gmail.com Backpatch-through: 18 --- doc/src/sgml/oauth-validators.sgml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/src/sgml/oauth-validators.sgml b/doc/src/sgml/oauth-validators.sgml index 704089dd7b3..3b9dad47411 100644 --- a/doc/src/sgml/oauth-validators.sgml +++ b/doc/src/sgml/oauth-validators.sgml @@ -403,9 +403,10 @@ typedef struct ValidatorModuleResult Shutdown Callback - The shutdown_cb callback is executed when the backend - process associated with the connection exits. If the validator module has - any allocated state, this callback should free it to avoid resource leaks. + The shutdown_cb callback is executed when the server + backend has finished validating tokens for the connection. If the validator + module has any allocated state, this callback should free it to avoid + resource leaks. typedef void (*ValidatorShutdownCB) (ValidatorModuleState *state);