Re: Reducing bgwriter wakeups - Mailing list pgsql-hackers

From Jeff Janes
Subject Re: Reducing bgwriter wakeups
Date
Msg-id CAMkU=1w9braCbJHNKYfD74TnSOwhD5TUYWBNpqYgqG8v6XDoQA@mail.gmail.com
Whole thread Raw
In response to Re: Reducing bgwriter wakeups  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Reducing bgwriter wakeups  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On Sun, Feb 19, 2012 at 2:18 PM, Robert Haas <robertmhaas@gmail.com> wrote:
>
> Also, in general, I think that it's not a good idea to let dirty data
> sit in shared_buffers forever.  I'm unhappy about the change this
> release cycle to skip checkpoints if we've written less than a full
> WAL segment, and this seems like another step in that direction.  It's
> exposing us to needless risk of data loss.  In 9.1, if you process a
> transaction and, an hour later, the disk where pg_xlog is written
> melts into a heap of molten slag, your transaction will be there, even
> if you end up having to run pg_resetxlog.

Would the log really have been archived in 9.1?  I don't think
checkpoint_timeout caused a log switch, just a checkpoint which could
happily be in the same file as the previous checkpoint.

> In 9.2, it may well be that
> xlog contains the only record of that transaction, and you're hosed.
> The more work we do to postpone writing the data until the absolutely
> last possible moment, the more likely it is that it won't be on disk
> when we need it.

Isn't that what archive_timeut is for?

Should archive_timeout default to something like 5 min, rather than 0?

Cheers,

Jeff


pgsql-hackers by date:

Previous
From: Brendan Jurd
Date:
Subject: Re: Future of our regular expression code
Next
From: Simon Riggs
Date:
Subject: Re: 16-bit page checksums for 9.2