Skip to content

Commit 60ba742

Browse files
author
Alexander Korotkov
committed
Some comments about GUCs.
1 parent 5b7fae5 commit 60ba742

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

contrib/pg_stat_wait/pg_stat_wait.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,9 @@ typedef union
136136
struct config_enum _enum;
137137
} mixedStruct;
138138

139+
/*
140+
* Set or reset history GUCs in shared memory.
141+
*/
139142
static void
140143
set_history_gucs()
141144
{
@@ -149,6 +152,7 @@ set_history_gucs()
149152
guc_vars = get_guc_variables();
150153
numOpts = GetNumConfigOptions();
151154

155+
/* Change pointers in already defined GUCs */
152156
for (i = 0; i < numOpts; i++)
153157
{
154158
mixedStruct *var = (mixedStruct *) guc_vars[i];
@@ -177,6 +181,7 @@ set_history_gucs()
177181
}
178182
}
179183

184+
/* Define undefined GUCs */
180185
if (!history_size_found)
181186
DefineCustomIntVariable("pg_stat_wait.history_size",
182187
"Sets size of waits history.", NULL,
@@ -198,6 +203,7 @@ set_history_gucs()
198203
PGC_SUSET, 0,
199204
shmem_bool_guc_check_hook, NULL, NULL);
200205

206+
/* Re-read config for already defined GUCs which values are missed */
201207
if (history_size_found || history_period_found || history_skip_latch_found)
202208
ProcessConfigFile(PGC_SIGHUP);
203209
}

0 commit comments

Comments
 (0)