File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ register_wait_collector(void)
42
42
worker .bgw_start_time = BgWorkerStart_ConsistentState ;
43
43
worker .bgw_restart_time = 0 ;
44
44
worker .bgw_notify_pid = 0 ;
45
- #if PG_VERSION_NUM >= 100000
45
+ #if PG_VERSION_NUM >= 100000 || defined( WIN32 )
46
46
memcpy (worker .bgw_library_name , "pg_wait_sampling" , BGW_MAXLEN );
47
47
memcpy (worker .bgw_function_name , CppAsString (collector_main ), BGW_MAXLEN );
48
48
#else
@@ -310,10 +310,7 @@ collector_main(Datum main_arg)
310
310
311
311
CurrentResourceOwner = ResourceOwnerCreate (NULL , "pg_wait_sampling collector" );
312
312
collector_context = AllocSetContextCreate (TopMemoryContext ,
313
- "pg_wait_sampling context" ,
314
- ALLOCSET_DEFAULT_MINSIZE ,
315
- ALLOCSET_DEFAULT_INITSIZE ,
316
- ALLOCSET_DEFAULT_MAXSIZE );
313
+ "pg_wait_sampling context" , ALLOCSET_DEFAULT_SIZES );
317
314
old_context = MemoryContextSwitchTo (collector_context );
318
315
alloc_history (& observations , collector_hdr -> historySize );
319
316
MemoryContextSwitchTo (old_context );
You can’t perform that action at this time.
0 commit comments