Re: BUG #9161: wal_writer_delay is limited to 10s

Поиск
Список
Период
Сортировка
От Clemens Eisserer
Тема Re: BUG #9161: wal_writer_delay is limited to 10s
Дата
Msg-id CAFvQSYRvKYNj8FVMztVLtvBdarz=W1wE7-BRyXpaaxJ+dg_Kjg@mail.gmail.com
обсуждение исходный текст
Ответ на BUG #9161: wal_writer_delay is limited to 10s  (linuxhippy@gmail.com)
Ответы Re: BUG #9161: wal_writer_delay is limited to 10s  (Andres Freund <andres@2ndquadrant.com>)
Список pgsql-bugs
Hi Tom,

Thanks for taking a look at my bug report.

> But if you're generating WAL, it's going to get written anyway
> whenever a transaction commits.

As far as I understood, this is only the case with
synchronous_commit=on, which is the reason why I turned synchrous
commit off.

> You could forestall that with fsync=off,
> perhaps, but if you do that then the WAL writer won't fsync either, so
> it shouldn't matter how often it wakes up.  Checkpoints will force WAL
> output more often than once per hour by default, too.  So I'm wondering
> exactly what combination of other settings you envision using this with,
> and what's the workload of the database server.

Because the system should be crash-resistent, my goal would be to have
postgresql issue fsyncs only every few minutes instead of every 10s,
by running the wal writer only every now and then (I know there is
only very little data in the WAL anyway).

For now I have a single insert transaction every 10s with
synchronous_commit=off, however because the wal writer weaks up every
10s data are immediatly written to the SD card, dramatically reducing
its lifespan.

Lost data isn't a real concern, however a worst-case scenario would be
when after a crash / power loss the database would be corrupted and
would refuse to initialize.

Regards, Clemens

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

Предыдущее
От: eshkinkot@gmail.com
Дата:
Сообщение: BUG #9223: plperlu result memory leak
Следующее
От: Andres Freund
Дата:
Сообщение: Re: BUG #9161: wal_writer_delay is limited to 10s