@@ -102,9 +102,6 @@ setup_gucs()
102
102
history_period_found = false,
103
103
profile_period_found = false;
104
104
105
- /* Initialize the guc_variables[] array */
106
- build_guc_variables ();
107
-
108
105
guc_vars = get_guc_variables ();
109
106
numOpts = GetNumConfigOptions ();
110
107
@@ -113,20 +110,26 @@ setup_gucs()
113
110
mixedStruct * var = (mixedStruct * ) guc_vars [i ];
114
111
const char * name = var -> generic .name ;
115
112
113
+ if (var -> generic .flags & GUC_CUSTOM_PLACEHOLDER )
114
+ continue ;
115
+
116
116
if (!strcmp (name , "pg_wait_sampling.history_size" ))
117
117
{
118
118
history_size_found = true;
119
119
var -> integer .variable = & collector_hdr -> historySize ;
120
+ collector_hdr -> historySize = 5000 ;
120
121
}
121
122
else if (!strcmp (name , "pg_wait_sampling.history_period" ))
122
123
{
123
124
history_period_found = true;
124
125
var -> integer .variable = & collector_hdr -> historyPeriod ;
126
+ collector_hdr -> historyPeriod = 10 ;
125
127
}
126
128
else if (!strcmp (name , "pg_wait_sampling.profile_period" ))
127
129
{
128
130
profile_period_found = true;
129
131
var -> integer .variable = & collector_hdr -> profilePeriod ;
132
+ collector_hdr -> profilePeriod = 10 ;
130
133
}
131
134
}
132
135
@@ -147,6 +150,9 @@ setup_gucs()
147
150
"Sets period of waits profile sampling." , NULL ,
148
151
& collector_hdr -> profilePeriod , 10 , 1 , INT_MAX ,
149
152
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 );
150
156
}
151
157
152
158
/*
0 commit comments