Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit63521cd

Browse files
committed
Add cfs_enable_gc GUC variable
1 parent92d1f9f commit63521cd

File tree

1 file changed

+24
-0
lines changed
  • src/backend/utils/misc

1 file changed

+24
-0
lines changed

‎src/backend/utils/misc/guc.c

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,8 @@ static void assign_application_name(const char *newval, void *extra);
186186
staticboolcheck_cluster_name(char**newval,void**extra,GucSourcesource);
187187
staticconstchar*show_unix_socket_permissions(void);
188188
staticconstchar*show_log_file_mode(void);
189+
staticvoidset_cfs_gc_enabled(boolnewval,void*extra);
190+
staticcharconst*show_cfs_gc_enabled(void);
189191

190192
/* Private functions in guc-file.l that need to be called from guc.c */
191193
staticConfigVariable*ProcessConfigFileInternal(GucContextcontext,
@@ -446,6 +448,7 @@ boolrow_security;
446448
boolcheck_function_bodies= true;
447449
booldefault_with_oids= false;
448450
boolSQL_inheritance= true;
451+
boolcfs_gc_enabled= true;
449452

450453
intlog_min_error_statement=ERROR;
451454
intlog_min_messages=WARNING;
@@ -1689,6 +1692,16 @@ static struct config_bool ConfigureNamesBool[] =
16891692
NULL,NULL,NULL
16901693
},
16911694

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+
16921705
{
16931706
{"cfs_gc_verify_file",PGC_USERSET,UNGROUPED,
16941707
gettext_noop("Verify correctness of data written by GC"),
@@ -10842,4 +10855,15 @@ show_log_file_mode(void)
1084210855
returnbuf;
1084310856
}
1084410857

10858+
staticvoidset_cfs_gc_enabled(boolnewval,void*extra)
10859+
{
10860+
cfs_control_gc(newval);
10861+
}
10862+
10863+
staticcharconst*show_cfs_gc_enabled(void)
10864+
{
10865+
returncfs_state&&cfs_state->gc_enabled ?"true" :"false";
10866+
}
10867+
10868+
1084510869
#include"guc-file.c"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp