The following patch disables WAL backup pages when fsync is off.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
Index: src/backend/access/transam/xlog.c
===================================================================
RCS file: /cvsroot/pgsql/src/backend/access/transam/xlog.c,v
retrieving revision 1.205
diff -c -c -r1.205 xlog.c
*** src/backend/access/transam/xlog.c   30 Jun 2005 00:00:50 -0000      1.205
--- src/backend/access/transam/xlog.c   3 Jul 2005 02:52:57 -0000
***************
*** 593,599 ****
                                {
                                        /* OK, put it in this slot */
                                        dtbuf[i] = rdt->buffer;
!                                       if (XLogCheckBuffer(rdt, 
&(dtbuf_lsn[i]), &(dtbuf_xlg[i])))
                                        {
                                                dtbuf_bkp[i] = true;
                                                rdt->data = NULL;
--- 593,601 ----
                                {
                                        /* OK, put it in this slot */
                                        dtbuf[i] = rdt->buffer;
!                                       /* If fsync is off, no need to backup 
pages. */
!                                       if (enableFsync &&
!                                               XLogCheckBuffer(rdt, 
&(dtbuf_lsn[i]), &(dtbuf_xlg[i])))
                                        {
                                                dtbuf_bkp[i] = true;
                                                rdt->data = NULL;
---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

               http://archives.postgresql.org

Reply via email to