Skip site navigation (1) Skip section navigation (2)

Re: BUG #4879: bgwriter fails to fsync the file in recovery mode

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Simon Riggs <simon(at)2ndQuadrant(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #4879: bgwriter fails to fsync the file in recovery mode
Date: 2009-06-25 22:31:53
Message-ID: 7671.1245969113@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> writes:
> Tom Lane wrote:
>> The behavior you seem to have in mind would be completely disastrous
>> from a performance standpoint, as we'd be writing and fsyncing
>> pg_control constantly during a recovery.

> Please define "constantly". We discussed that part of the patch here:
> http://archives.postgresql.org/message-id/498AB55D.50408@enterprisedb.com

Okay, after reading the code a bit more I found this:

        /*
         * To avoid having to update the control file too often, we update it
         * all the way to the last record being replayed, even though 'lsn'
         * would suffice for correctness.
         */

which should alleviate the too-many-writes syndrome.  Never mind that
complaint then.  (But shouldn't there be an Assert that this is >= lsn?)

			regards, tom lane

In response to

Responses

pgsql-bugs by date

Next:From: Tom LaneDate: 2009-06-25 22:40:43
Subject: Re: BUG #4879: bgwriter fails to fsync the file in recovery mode
Previous:From: William ChuDate: 2009-06-25 22:22:59
Subject: BUG #4884: Misleading error message

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group