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

Commit 8e534cc

Browse files
committed
Rename cfs_enable_gc option to cfs_gc
1 parent 63521cd commit 8e534cc

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

src/backend/storage/file/cfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ void cfs_initialize()
396396
pg_atomic_init_flag(&cfs_state->gc_started);
397397
pg_atomic_init_u32(&cfs_state->n_active_gc, 0);
398398
cfs_state->n_workers = 0;
399-
cfs_state->gc_enabled = true;
399+
cfs_state->gc_enabled = cfs_gc_enabled;
400400
cfs_state->max_iterations = 0;
401401

402402
if (cfs_encryption)

src/backend/utils/misc/guc.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1693,7 +1693,7 @@ static struct config_bool ConfigureNamesBool[] =
16931693
},
16941694

16951695
{
1696-
{"cfs_enable_gc", PGC_USERSET, UNGROUPED,
1696+
{"cfs_gc", PGC_USERSET, UNGROUPED,
16971697
gettext_noop("Enable garbage collection of compressed pages"),
16981698
NULL,
16991699
},
@@ -10857,12 +10857,14 @@ show_log_file_mode(void)
1085710857

1085810858
static void set_cfs_gc_enabled(bool newval, void* extra)
1085910859
{
10860-
cfs_control_gc(newval);
10860+
cfs_gc_enabled = newval;
10861+
if (cfs_state)
10862+
cfs_control_gc(newval);
1086110863
}
1086210864

1086310865
static char const* show_cfs_gc_enabled(void)
1086410866
{
10865-
return cfs_state && cfs_state->gc_enabled ? "true" : "false";
10867+
return (cfs_state ? cfs_state->gc_enabled : cfs_gc_enabled) ? "true" : "false";
1086610868
}
1086710869

1086810870

src/include/utils/guc.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,8 @@ extern bool log_executor_stats;
244244
extern bool log_statement_stats;
245245
extern bool log_btree_build_stats;
246246

247+
extern bool cfs_gc_enabled;
248+
247249
extern PGDLLIMPORT bool check_function_bodies;
248250
extern bool default_with_oids;
249251
extern bool SQL_inheritance;

0 commit comments

Comments
 (0)