agora inbox for pgsql-committers@postgresql.orghelp / color / mirror / Atom feed
pgsql: test_custom_stats: Fail if loading module outside shared_preload 2+ messages / 1 participants [nested] [flat]
* pgsql: test_custom_stats: Fail if loading module outside shared_preload @ 2026-07-02 06:53 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 2+ messages in thread From: Michael Paquier @ 2026-07-02 06:53 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org test_custom_stats: Fail if loading module outside shared_preload_libraries Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries, behavior inherited from injection_points. This left the SQL functions callable without the kind registered, leading to various issues on the backend side. This code is not designed to work without the pgstats kinds registered. pgstat_register_kind() gets now called when these libraries are loaded, with or without shared_preload_libraries, letting the registration fail if loading the modules at a later step than startup. test_custom_rmgrs does the same thing. Oversight in 31280d96a648. Author: Bertrand Drouvot <bertranddrouvot.pg@gmail.com> Reviewed-by: Ewan Young <kdbase.hack@gmail.com> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk@bdtpg Backpatch-through: 19 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/5045d9ff3b5a8b09742d8bf70221c7d708305219 Modified Files -------------- src/test/modules/test_custom_stats/test_custom_fixed_stats.c | 4 ---- src/test/modules/test_custom_stats/test_custom_var_stats.c | 4 ---- 2 files changed, 8 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: test_custom_stats: Fail if loading module outside shared_preload @ 2026-07-02 06:53 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 2+ messages in thread From: Michael Paquier @ 2026-07-02 06:53 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org test_custom_stats: Fail if loading module outside shared_preload_libraries Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries, behavior inherited from injection_points. This left the SQL functions callable without the kind registered, leading to various issues on the backend side. This code is not designed to work without the pgstats kinds registered. pgstat_register_kind() gets now called when these libraries are loaded, with or without shared_preload_libraries, letting the registration fail if loading the modules at a later step than startup. test_custom_rmgrs does the same thing. Author: Bertrand Drouvot <bertranddrouvot.pg@gmail.com> Reviewed-by: Ewan Young <kdbase.hack@gmail.com> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk@bdtpg Backpatch-through: 19 Branch ------ REL_19_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/7838efe9a2d165cc3cf3a4538ecc5f10d49b1a49 Modified Files -------------- src/test/modules/test_custom_stats/test_custom_fixed_stats.c | 4 ---- src/test/modules/test_custom_stats/test_custom_var_stats.c | 4 ---- 2 files changed, 8 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2026-07-02 06:53 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2026-07-02 06:53 pgsql: test_custom_stats: Fail if loading module outside shared_preload Michael Paquier <michael@paquier.xyz> 2026-07-02 06:53 pgsql: test_custom_stats: Fail if loading module outside shared_preload Michael Paquier <michael@paquier.xyz>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox