@@ -154,43 +154,52 @@ set_history_gucs()
154
154
mixedStruct * var = (mixedStruct * )guc_vars [i ];
155
155
const char * name = var -> generic .name ;
156
156
157
+ if (var -> generic .flags & GUC_CUSTOM_PLACEHOLDER )
158
+ continue ;
159
+
157
160
if (!strcmp (name ,"pg_stat_wait.history_size" ))
158
161
{
159
162
history_size_found = true;
160
163
var -> integer .variable = & collector_hdr -> historySize ;
164
+ collector_hdr -> historySize = 5000 ;
161
165
}
162
166
else if (!strcmp (name ,"pg_stat_wait.history_period" ))
163
167
{
164
168
history_period_found = true;
165
169
var -> integer .variable = & collector_hdr -> historyPeriod ;
170
+ collector_hdr -> historyPeriod = 10 ;
166
171
}
167
172
else if (!strcmp (name ,"pg_stat_wait.history_skip_latch" ))
168
173
{
169
174
history_skip_latch_found = true;
170
175
var -> _bool .variable = & collector_hdr -> historySkipLatch ;
176
+ collector_hdr -> historySkipLatch = false;
171
177
}
172
178
}
173
179
174
180
if (!history_size_found )
175
181
DefineCustomIntVariable ("pg_stat_wait.history_size" ,
176
182
"Sets size of waits history." ,NULL ,
177
183
& collector_hdr -> historySize ,5000 ,100 ,INT_MAX ,
178
- PGC_SUSET ,GUC_CUSTOM_PLACEHOLDER ,
184
+ PGC_SUSET ,0 ,
179
185
shmem_int_guc_check_hook ,NULL ,NULL );
180
186
181
187
if (!history_period_found )
182
188
DefineCustomIntVariable ("pg_stat_wait.history_period" ,
183
189
"Sets period of waits history sampling." ,NULL ,
184
190
& collector_hdr -> historyPeriod ,10 ,1 ,INT_MAX ,
185
- PGC_SUSET ,GUC_CUSTOM_PLACEHOLDER ,
191
+ PGC_SUSET ,0 ,
186
192
shmem_int_guc_check_hook ,NULL ,NULL );
187
193
188
194
if (!history_skip_latch_found )
189
195
DefineCustomBoolVariable ("pg_stat_wait.history_skip_latch" ,
190
196
"Skip latch events in waits history" ,NULL ,
191
197
& collector_hdr -> historySkipLatch , false,
192
- PGC_SUSET ,GUC_CUSTOM_PLACEHOLDER ,
198
+ PGC_SUSET ,0 ,
193
199
shmem_bool_guc_check_hook ,NULL ,NULL );
200
+
201
+ if (history_size_found || history_period_found || history_skip_latch_found )
202
+ ProcessConfigFile (PGC_SIGHUP );
194
203
}
195
204
196
205
/*