Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 248700f

Browse files
committed
Merge commit '1ab327006c8a248a8a70707fe00e3feb270a05ae' into PGPROEE10
2 parents 2a9fb89 + 1ab3270 commit 248700f

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

contrib/pg_wait_sampling/collector.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ register_wait_collector(void)
4242
worker.bgw_start_time = BgWorkerStart_ConsistentState;
4343
worker.bgw_restart_time = 0;
4444
worker.bgw_notify_pid = 0;
45-
#if PG_VERSION_NUM >= 100000
45+
#if PG_VERSION_NUM >= 100000 || defined(WIN32)
4646
memcpy(worker.bgw_library_name, "pg_wait_sampling", BGW_MAXLEN);
4747
memcpy(worker.bgw_function_name, CppAsString(collector_main), BGW_MAXLEN);
4848
#else
@@ -310,10 +310,7 @@ collector_main(Datum main_arg)
310310

311311
CurrentResourceOwner = ResourceOwnerCreate(NULL, "pg_wait_sampling collector");
312312
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);
317314
old_context = MemoryContextSwitchTo(collector_context);
318315
alloc_history(&observations, collector_hdr->historySize);
319316
MemoryContextSwitchTo(old_context);

0 commit comments

Comments
 (0)