agora inbox for [email protected]help / color / mirror / Atom feed
[PATCH v1 3/4] autovac: combine reloptions correctly 64+ messages / 2 participants [nested] [flat]
* [PATCH v1 3/4] autovac: combine reloptions correctly @ 2025-06-23 20:16 Nathan Bossart <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Nathan Bossart @ 2025-06-23 20:16 UTC (permalink / raw) --- src/backend/postmaster/autovacuum.c | 85 +++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) diff --git a/src/backend/postmaster/autovacuum.c b/src/backend/postmaster/autovacuum.c index 3bedca971ff..0d1f4e38b58 100644 --- a/src/backend/postmaster/autovacuum.c +++ b/src/backend/postmaster/autovacuum.c @@ -1873,6 +1873,73 @@ get_database_list(void) return dblist; } +static void +combine_relopts(StdRdOptions *toast_opts, const StdRdOptions *main_opts) +{ + AutoVacOpts *toast_avopts = &toast_opts->autovacuum; + const AutoVacOpts *main_avopts = &main_opts->autovacuum; + + /* XXX: need isset_offset to combine "enabled" */ + + if (toast_avopts->vacuum_threshold == -1) + toast_avopts->vacuum_threshold = main_avopts->vacuum_threshold; + + if (toast_avopts->vacuum_max_threshold == -2) + toast_avopts->vacuum_max_threshold = main_avopts->vacuum_max_threshold; + + if (toast_avopts->vacuum_ins_threshold == -2) + toast_avopts->vacuum_ins_threshold = main_avopts->vacuum_ins_threshold; + + if (toast_avopts->analyze_threshold == -1) + toast_avopts->analyze_threshold = main_avopts->analyze_threshold; + + if (toast_avopts->vacuum_cost_limit == -1) + toast_avopts->vacuum_cost_limit = main_avopts->vacuum_cost_limit; + + if (toast_avopts->freeze_min_age == -1) + toast_avopts->freeze_min_age = main_avopts->freeze_min_age; + + if (toast_avopts->freeze_max_age == -1) + toast_avopts->freeze_max_age = main_avopts->freeze_max_age; + + if (toast_avopts->freeze_table_age == -1) + toast_avopts->freeze_table_age = main_avopts->freeze_table_age; + + if (toast_avopts->multixact_freeze_min_age == -1) + toast_avopts->multixact_freeze_min_age = main_avopts->multixact_freeze_min_age; + + if (toast_avopts->multixact_freeze_max_age == -1) + toast_avopts->multixact_freeze_max_age = main_avopts->multixact_freeze_max_age; + + if (toast_avopts->multixact_freeze_table_age == -1) + toast_avopts->multixact_freeze_table_age = main_avopts->multixact_freeze_table_age; + + /* XXX: need isset_offset for log_min_duration */ + + if (toast_avopts->vacuum_cost_delay == -1) + toast_avopts->vacuum_cost_delay = main_avopts->vacuum_cost_delay; + + if (toast_avopts->vacuum_scale_factor == -1) + toast_avopts->vacuum_scale_factor = main_avopts->vacuum_scale_factor; + + if (toast_avopts->vacuum_ins_scale_factor == -1) + toast_avopts->vacuum_ins_scale_factor = main_avopts->vacuum_ins_scale_factor; + + if (toast_avopts->analyze_scale_factor == -1) + toast_avopts->analyze_scale_factor = main_avopts->analyze_scale_factor; + + /* XXX: need isset_offset for vacuum_index_cleanup */ + + if (!toast_opts->vacuum_truncate_set && main_opts->vacuum_truncate_set) + { + toast_opts->vacuum_truncate = main_opts->vacuum_truncate; + toast_opts->vacuum_truncate_set = true; + } + + if (toast_opts->vacuum_max_eager_freeze_failure_rate == -1) + toast_opts->vacuum_max_eager_freeze_failure_rate = main_opts->vacuum_max_eager_freeze_failure_rate; +} + /* * Process a database table-by-table * @@ -2113,7 +2180,16 @@ do_autovacuum(void) */ relopts = (StdRdOptions *) extractRelOptions(tuple, pg_class_desc, NULL); if (relopts) + { + av_relation *hentry; + bool found; + free_relopts = true; + + hentry = hash_search(table_toast_map, &relid, HASH_FIND, &found); + if (found && hentry->ar_hasrelopts) + combine_relopts(relopts, &hentry->ar_reloptions); + } else { av_relation *hentry; @@ -2733,7 +2809,16 @@ table_recheck_autovac(Oid relid, HTAB *table_toast_map, */ relopts = (StdRdOptions *) extractRelOptions(classTup, pg_class_desc, NULL); if (relopts) + { + av_relation *hentry; + bool found; + free_relopts = true; + + hentry = hash_search(table_toast_map, &relid, HASH_FIND, &found); + if (found && hentry->ar_hasrelopts) + combine_relopts(relopts, &hentry->ar_reloptions); + } else if (classForm->relkind == RELKIND_TOASTVALUE && table_toast_map != NULL) { -- 2.39.5 (Apple Git-154) --QWBYbd5Ar5k8NvSv Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=v1-0004-combine-relopts-correctly-for-VACUUM-commands.patch ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
* [PATCH v3] Fix test_custom_stats modules to error out when not preloaded @ 2026-07-02 04:34 Bertrand Drouvot <[email protected]> 0 siblings, 0 replies; 64+ messages in thread From: Bertrand Drouvot @ 2026-07-02 04:34 UTC (permalink / raw) Previously, test_custom_var_stats and test_custom_fixed_stats silently skipped pgstat_register_kind() when not loaded via shared_preload_libraries. This left the SQL functions callable without the kind registered, leading to NULL dereferences in core pgstat functions. Remove the early return and let pgstat_register_kind() error out naturally, matching the pattern used by test_custom_rmgrs with RegisterCustomRmgr(). Now CREATE EXTENSION fails with a clear error if the module is not preloaded. Author: Bertrand Drouvot <[email protected]> Reviewed-by: Ewan Young <[email protected]> Discussion: https://postgr.es/m/akS/ldidWeqG1FWk%40bdtpg --- .../modules/test_custom_stats/test_custom_fixed_stats.c | 9 ++++----- .../modules/test_custom_stats/test_custom_var_stats.c | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 100.0% src/test/modules/test_custom_stats/ diff --git a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c index a066ce117a6..8b29ca3e27a 100644 --- a/src/test/modules/test_custom_stats/test_custom_fixed_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_fixed_stats.c @@ -72,11 +72,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_FIXED_STATS, &custom_stats); } diff --git a/src/test/modules/test_custom_stats/test_custom_var_stats.c b/src/test/modules/test_custom_stats/test_custom_var_stats.c index 863d6a52492..fa415c81301 100644 --- a/src/test/modules/test_custom_stats/test_custom_var_stats.c +++ b/src/test/modules/test_custom_stats/test_custom_var_stats.c @@ -129,11 +129,10 @@ static const PgStat_KindInfo custom_stats = { void _PG_init(void) { - /* Must be loaded via shared_preload_libraries */ - if (!process_shared_preload_libraries_in_progress) - return; - - /* Register custom statistics kind */ + /* + * In order to register our custom statistics kind, we have to be loaded + * via shared_preload_libraries. Otherwise, registration will fail. + */ pgstat_register_kind(PGSTAT_KIND_TEST_CUSTOM_VAR_STATS, &custom_stats); } -- 2.34.1 --i51FQWZELabmlh2Y-- ^ permalink raw reply [nested|flat] 64+ messages in thread
end of thread, other threads:[~2026-07-02 04:34 UTC | newest] Thread overview: 64+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2025-06-23 20:16 [PATCH v1 3/4] autovac: combine reloptions correctly Nathan Bossart <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]> 2026-07-02 04:34 [PATCH v3] Fix test_custom_stats modules to error out when not preloaded Bertrand Drouvot <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox