diff options
author | Jan Wieck <JanWieck@Yahoo.com> | 2004-01-24 20:00:46 +0000 |
---|---|---|
committer | Jan Wieck <JanWieck@Yahoo.com> | 2004-01-24 20:00:46 +0000 |
commit | d77b63b17cb34c69b4ace1f4479566b9f9160e2b (patch) | |
tree | 0cb83cec44628e1b8db0bca809a77724af581a91 /src/backend/utils/misc/guc.c | |
parent | 610d33c1949005e9658863441f31083f9f3ceb9b (diff) | |
download | postgresql-d77b63b17cb34c69b4ace1f4479566b9f9160e2b.tar.gz postgresql-d77b63b17cb34c69b4ace1f4479566b9f9160e2b.zip |
Added GUC variable bgwriter_flush_method controlling the action
done by the background writer between writing dirty blocks and
napping.
none (default) no action
sync bgwriter calls smgrsync() causing a sync(2)
A global sync() is only good on dedicated database servers, so
more flush methods should be added in the future.
Jan
Diffstat (limited to 'src/backend/utils/misc/guc.c')
-rw-r--r-- | src/backend/utils/misc/guc.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index 04a7e7287b1..7b3bde2d0c2 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -10,7 +10,7 @@ * Written by Peter Eisentraut <peter_e@gmx.net>. * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.179 2004/01/23 23:54:21 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.180 2004/01/24 20:00:45 wieck Exp $ * *-------------------------------------------------------------------- */ @@ -95,6 +95,8 @@ static const char *assign_msglvl(int *var, const char *newval, static const char *assign_log_error_verbosity(const char *newval, bool doit, GucSource source); static bool assign_phony_autocommit(bool newval, bool doit, GucSource source); +extern const char *BgWriterAssignSyncMethod(const char *method, + bool doit, GucSource source); /* @@ -1689,6 +1691,15 @@ static struct config_string ConfigureNamesString[] = XLOG_sync_method_default, assign_xlog_sync_method, NULL }, + { + {"bgwriter_flush_method", PGC_SIGHUP, RESOURCES, + gettext_noop("Selects the method used by the bgwriter for forcing writes out to disk."), + NULL + }, + &BgWriterFlushMethod_str, + BgWriterFlushMethod_default, BgWriterAssignSyncMethod, NULL + }, + /* End-of-list marker */ { {NULL, 0, 0, NULL, NULL}, NULL, NULL, NULL, NULL |