提交 d7207cfc 编写于 作者: T Tom Lane

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.
上级 a4ffa382
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册