diff options
author | Bruce Momjian <bruce@momjian.us> | 2005-07-05 23:18:10 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2005-07-05 23:18:10 +0000 |
commit | 326a7a0788b4e3c18d4e7008e3943bdb81a21769 (patch) | |
tree | cb59060baf5f2566eb681258f620afa2c13e5553 /src/backend/access/transam/xlog.c | |
parent | c19aa704c84e660c73fb45e0d3f38d0840f17823 (diff) | |
download | postgresql-326a7a0788b4e3c18d4e7008e3943bdb81a21769.tar.gz postgresql-326a7a0788b4e3c18d4e7008e3943bdb81a21769.zip |
Add GUC full_page_writes to control writing full pages to WAL.
Diffstat (limited to 'src/backend/access/transam/xlog.c')
-rw-r--r-- | src/backend/access/transam/xlog.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index d42aa93c547..86e1e6878b8 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.206 2005/07/04 04:51:44 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.207 2005/07/05 23:18:09 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -103,6 +103,7 @@ int XLOGbuffers = 8; char *XLogArchiveCommand = NULL; char *XLOG_sync_method = NULL; const char XLOG_sync_method_default[] = DEFAULT_SYNC_METHOD_STR; +bool fullPageWrites = true; #ifdef WAL_DEBUG bool XLOG_DEBUG = false; @@ -594,7 +595,9 @@ begin:; { /* OK, put it in this slot */ dtbuf[i] = rdt->buffer; - if (XLogCheckBuffer(rdt, &(dtbuf_lsn[i]), &(dtbuf_xlg[i]))) + /* If fsync is off, no need to backup pages. */ + if (fullPageWrites && + XLogCheckBuffer(rdt, &(dtbuf_lsn[i]), &(dtbuf_xlg[i]))) { dtbuf_bkp[i] = true; rdt->data = NULL; |