Re: Reducing bgwriter wakeups

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Reducing bgwriter wakeups
Дата
Msg-id CA+Tgmob4-910AbDkys4=C2QrsRaPgp=TJUORnoSwmRpaLu0ggQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Reducing bgwriter wakeups  (Jeff Janes <jeff.janes@gmail.com>)
Список pgsql-hackers
On Sun, Feb 19, 2012 at 5:56 PM, Jeff Janes <jeff.janes@gmail.com> wrote:
> 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.

The log segment doesn't need to get archived - it's sufficient that
the dirty buffers get written to disk.

>> 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?

I dunno.  I think people are doing replication are probably mostly
using streaming replication these days, in which case archive_timeout
won't matter one way or the other.  But if you're not doing
replication, your only hope of recovering from a trashed pg_xlog is
that PostgreSQL wrote the buffers and (in the case of an OS crash) the
OS wrote them to disk.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: leakproof
Следующее
От: Robert Haas
Дата:
Сообщение: Re: 16-bit page checksums for 9.2