From: Jacob Champion Date: Fri, 29 May 2026 21:40:20 +0000 (-0700) Subject: doc: Correct the timeline for OAuth's shutdown_cb X-Git-Tag: REL_19_BETA1~10 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=08127c641c099b21480d4cd47c2706fe64ca1820;p=thirdparty%2Fpostgresql.git 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 --- diff --git a/doc/src/sgml/oauth-validators.sgml b/doc/src/sgml/oauth-validators.sgml index 7c9e3dd931a..8aad470a464 100644 --- a/doc/src/sgml/oauth-validators.sgml +++ b/doc/src/sgml/oauth-validators.sgml @@ -428,9 +428,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);