@@ -186,6 +186,8 @@ static void assign_application_name(const char *newval, void *extra);
186
186
static bool check_cluster_name (char * * newval , void * * extra , GucSource source );
187
187
static const char * show_unix_socket_permissions (void );
188
188
static const char * show_log_file_mode (void );
189
+ static void set_cfs_gc_enabled (bool newval , void * extra );
190
+ static char const * show_cfs_gc_enabled (void );
189
191
190
192
/* Private functions in guc-file.l that need to be called from guc.c */
191
193
static ConfigVariable * ProcessConfigFileInternal (GucContext context ,
@@ -446,6 +448,7 @@ bool row_security;
446
448
bool check_function_bodies = true;
447
449
bool default_with_oids = false;
448
450
bool SQL_inheritance = true;
451
+ bool cfs_gc_enabled = true;
449
452
450
453
int log_min_error_statement = ERROR ;
451
454
int log_min_messages = WARNING ;
@@ -1689,6 +1692,16 @@ static struct config_bool ConfigureNamesBool[] =
1689
1692
NULL , NULL , NULL
1690
1693
},
1691
1694
1695
+ {
1696
+ {"cfs_enable_gc" , PGC_USERSET , UNGROUPED ,
1697
+ gettext_noop ("Enable garbage collection of compressed pages" ),
1698
+ NULL ,
1699
+ },
1700
+ & cfs_gc_enabled ,
1701
+ true,
1702
+ NULL , set_cfs_gc_enabled , show_cfs_gc_enabled
1703
+ },
1704
+
1692
1705
{
1693
1706
{"cfs_gc_verify_file" , PGC_USERSET , UNGROUPED ,
1694
1707
gettext_noop ("Verify correctness of data written by GC" ),
@@ -10842,4 +10855,15 @@ show_log_file_mode(void)
10842
10855
return buf ;
10843
10856
}
10844
10857
10858
+ static void set_cfs_gc_enabled (bool newval , void * extra )
10859
+ {
10860
+ cfs_control_gc (newval );
10861
+ }
10862
+
10863
+ static char const * show_cfs_gc_enabled (void )
10864
+ {
10865
+ return cfs_state && cfs_state -> gc_enabled ? "true" : "false" ;
10866
+ }
10867
+
10868
+
10845
10869
#include "guc-file.c"
0 commit comments