postgres.git / summary / log / commit / refs

commit    d7207cfc6bc070660a2e51d2c892dd4d93f5b636
Author:   Tom Lane <tgl@sss.pgh.pa.us>
Date:     Fri Jul 08 04:07:26 2005 +0000
First released in: 8.1.0

    Even though I'd like to see full_page_writes go away before 8.1,
    a minimum requirement is that it not completely break the system
    meanwhile.  Put the test in the right place.


src/backend/access/transam/xlog.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 86e1e6878b8..f731dd66b7a 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.207 2005/07/05 23:18:09 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.208 2005/07/08 04:07:26 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -595,9 +595,7 @@ begin:; { /* OK, put it in this slot */ dtbuf[i] = rdt->buffer; - /* If fsync is off, no need to backup pages. */ - if (fullPageWrites && - XLogCheckBuffer(rdt, &(dtbuf_lsn[i]), &(dtbuf_xlg[i]))) + if (XLogCheckBuffer(rdt, &(dtbuf_lsn[i]), &(dtbuf_xlg[i]))) { dtbuf_bkp[i] = true; rdt->data = NULL; @@ -947,7 +945,8 @@ XLogCheckBuffer(XLogRecData *rdata, */ *lsn = page->pd_lsn; - if (XLByteLE(page->pd_lsn, RedoRecPtr)) + if (fullPageWrites && + XLByteLE(page->pd_lsn, RedoRecPtr)) { /* * The page needs to be backed up, so set up *bkpb [parent: a4ffa382345e]