Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit354c23b

Browse files
author
Alexander Korotkov
committed
Fix GUCs handling.
1 parenta6f2eee commit354c23b

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

‎pg_wait_sampling.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,6 @@ setup_gucs()
102102
history_period_found= false,
103103
profile_period_found= false;
104104

105-
/* Initialize the guc_variables[] array */
106-
build_guc_variables();
107-
108105
guc_vars=get_guc_variables();
109106
numOpts=GetNumConfigOptions();
110107

@@ -113,20 +110,26 @@ setup_gucs()
113110
mixedStruct*var= (mixedStruct*)guc_vars[i];
114111
constchar*name=var->generic.name;
115112

113+
if (var->generic.flags&GUC_CUSTOM_PLACEHOLDER)
114+
continue;
115+
116116
if (!strcmp(name,"pg_wait_sampling.history_size"))
117117
{
118118
history_size_found= true;
119119
var->integer.variable=&collector_hdr->historySize;
120+
collector_hdr->historySize=5000;
120121
}
121122
elseif (!strcmp(name,"pg_wait_sampling.history_period"))
122123
{
123124
history_period_found= true;
124125
var->integer.variable=&collector_hdr->historyPeriod;
126+
collector_hdr->historyPeriod=10;
125127
}
126128
elseif (!strcmp(name,"pg_wait_sampling.profile_period"))
127129
{
128130
profile_period_found= true;
129131
var->integer.variable=&collector_hdr->profilePeriod;
132+
collector_hdr->profilePeriod=10;
130133
}
131134
}
132135

@@ -147,6 +150,9 @@ setup_gucs()
147150
"Sets period of waits profile sampling.",NULL,
148151
&collector_hdr->profilePeriod,10,1,INT_MAX,
149152
PGC_SUSET,0,shmem_int_guc_check_hook,NULL,NULL);
153+
154+
if (history_size_found||history_period_found||profile_period_found)
155+
ProcessConfigFile(PGC_SIGHUP);
150156
}
151157

152158
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp