File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -396,7 +396,7 @@ void cfs_initialize()
396
396
pg_atomic_init_flag (& cfs_state -> gc_started );
397
397
pg_atomic_init_u32 (& cfs_state -> n_active_gc , 0 );
398
398
cfs_state -> n_workers = 0 ;
399
- cfs_state -> gc_enabled = true ;
399
+ cfs_state -> gc_enabled = cfs_gc_enabled ;
400
400
cfs_state -> max_iterations = 0 ;
401
401
402
402
if (cfs_encryption )
Original file line number Diff line number Diff line change @@ -1693,7 +1693,7 @@ static struct config_bool ConfigureNamesBool[] =
1693
1693
},
1694
1694
1695
1695
{
1696
- {"cfs_enable_gc " , PGC_USERSET , UNGROUPED ,
1696
+ {"cfs_gc " , PGC_USERSET , UNGROUPED ,
1697
1697
gettext_noop ("Enable garbage collection of compressed pages" ),
1698
1698
NULL ,
1699
1699
},
@@ -10857,12 +10857,14 @@ show_log_file_mode(void)
10857
10857
10858
10858
static void set_cfs_gc_enabled (bool newval , void * extra )
10859
10859
{
10860
- cfs_control_gc (newval );
10860
+ cfs_gc_enabled = newval ;
10861
+ if (cfs_state )
10862
+ cfs_control_gc (newval );
10861
10863
}
10862
10864
10863
10865
static char const * show_cfs_gc_enabled (void )
10864
10866
{
10865
- return cfs_state && cfs_state -> gc_enabled ? "true" : "false" ;
10867
+ return ( cfs_state ? cfs_state -> gc_enabled : cfs_gc_enabled ) ? "true" : "false" ;
10866
10868
}
10867
10869
10868
10870
Original file line number Diff line number Diff line change @@ -244,6 +244,8 @@ extern bool log_executor_stats;
244
244
extern bool log_statement_stats ;
245
245
extern bool log_btree_build_stats ;
246
246
247
+ extern bool cfs_gc_enabled ;
248
+
247
249
extern PGDLLIMPORT bool check_function_bodies ;
248
250
extern bool default_with_oids ;
249
251
extern bool SQL_inheritance ;
You can’t perform that action at this time.
0 commit comments