mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03: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:
@ -7,7 +7,7 @@
|
|||||||
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* 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 */
|
/* OK, put it in this slot */
|
||||||
dtbuf[i] = rdt->buffer;
|
dtbuf[i] = rdt->buffer;
|
||||||
/* If fsync is off, no need to backup pages. */
|
if (XLogCheckBuffer(rdt, &(dtbuf_lsn[i]), &(dtbuf_xlg[i])))
|
||||||
if (fullPageWrites &&
|
|
||||||
XLogCheckBuffer(rdt, &(dtbuf_lsn[i]), &(dtbuf_xlg[i])))
|
|
||||||
{
|
{
|
||||||
dtbuf_bkp[i] = true;
|
dtbuf_bkp[i] = true;
|
||||||
rdt->data = NULL;
|
rdt->data = NULL;
|
||||||
@ -947,7 +945,8 @@ XLogCheckBuffer(XLogRecData *rdata,
|
|||||||
*/
|
*/
|
||||||
*lsn = page->pd_lsn;
|
*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
|
* The page needs to be backed up, so set up *bkpb
|
||||||
|
Reference in New Issue
Block a user