mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-03-07 19:47:50 +08:00
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.
This commit is contained in:
parent
a4ffa38234
commit
d7207cfc6b
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user