diff options
author | Jan Wieck <JanWieck@Yahoo.com> | 2004-02-04 01:24:53 +0000 |
---|---|---|
committer | Jan Wieck <JanWieck@Yahoo.com> | 2004-02-04 01:24:53 +0000 |
commit | 8d09e25693615320f03f3b1fd3412a90cbaa28b7 (patch) | |
tree | 31c6ba8d8f249596ca73af58797ba159c8a5134f /src/backend/storage/buffer/bufmgr.c | |
parent | e66fcce67272f5aece55e834b34ed318b67f921b (diff) | |
download | postgresql-8d09e25693615320f03f3b1fd3412a90cbaa28b7.tar.gz postgresql-8d09e25693615320f03f3b1fd3412a90cbaa28b7.zip |
Backing out the background writer sync() option.
Jan
Diffstat (limited to 'src/backend/storage/buffer/bufmgr.c')
-rw-r--r-- | src/backend/storage/buffer/bufmgr.c | 51 |
1 files changed, 1 insertions, 50 deletions
diff --git a/src/backend/storage/buffer/bufmgr.c b/src/backend/storage/buffer/bufmgr.c index 49e2315dad4..cb82159aff0 100644 --- a/src/backend/storage/buffer/bufmgr.c +++ b/src/backend/storage/buffer/bufmgr.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/storage/buffer/bufmgr.c,v 1.154 2004/01/30 15:57:03 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/storage/buffer/bufmgr.c,v 1.155 2004/02/04 01:24:53 wieck Exp $ * *------------------------------------------------------------------------- */ @@ -55,7 +55,6 @@ #include "storage/proc.h" #include "storage/smgr.h" #include "utils/relcache.h" -#include "utils/guc.h" #include "pgstat.h" @@ -66,23 +65,9 @@ /* GUC variable */ bool zero_damaged_pages = false; -#define BGWRITER_FLUSH_NONE 0 -#define BGWRITER_FLUSH_NONE_STR "none" -#define BGWRITER_FLUSH_SYNC 1 -#define BGWRITER_FLUSH_SYNC_STR "sync" - -#define BGWRITER_FLUSH_DEFAULT BGWRITER_FLUSH_NONE -#define BGWRITER_FLUSH_DEFAULT_STR BGWRITER_FLUSH_NONE_STR - int BgWriterDelay = 200; int BgWriterPercent = 1; int BgWriterMaxpages = 100; -int BgWriterFlushMethod = BGWRITER_FLUSH_NONE; -char *BgWriterFlushMethod_str = NULL; -const char BgWriterFlushMethod_default[] = BGWRITER_FLUSH_DEFAULT_STR; - -const char *BgWriterAssignSyncMethod(const char *method, - bool doit, GucSource source); static void WaitIO(BufferDesc *buf); static void StartBufferIO(BufferDesc *buf, bool forInput); @@ -1042,19 +1027,6 @@ BufferBackgroundWriter(void) return; /* - * Perform the configured buffer flush method - */ - switch (BgWriterFlushMethod) - { - case BGWRITER_FLUSH_NONE: - break; - - case BGWRITER_FLUSH_SYNC: - smgrsync(); - break; - } - - /* * Nap for the configured time or sleep for 10 seconds if * there was nothing to do at all. */ @@ -1062,27 +1034,6 @@ BufferBackgroundWriter(void) } } -const char * -BgWriterAssignSyncMethod(const char *method, bool doit, GucSource source) -{ - int new_flush_method; - - if (strcasecmp(method, BGWRITER_FLUSH_NONE_STR) == 0) - new_flush_method = BGWRITER_FLUSH_NONE; - else - if (strcasecmp(method, BGWRITER_FLUSH_SYNC_STR) == 0) - new_flush_method = BGWRITER_FLUSH_SYNC; - else - return NULL; - - if (!doit) - return method; - - BgWriterFlushMethod = new_flush_method; - return method; -} - - /* * Do whatever is needed to prepare for commit at the bufmgr and smgr levels */ |