Re: Replication and fsync

Поиск
Список
Период
Сортировка
От Tomas Vondra
Тема Re: Replication and fsync
Дата
Msg-id 526BD198.7000404@fuzzy.cz
обсуждение исходный текст
Ответ на Re: Replication and fsync  (Alban Hertroys <haramrae@gmail.com>)
Ответы Re: Replication and fsync  (Kevin Grittner <kgrittn@ymail.com>)
Список pgsql-general
Hi,

On 24.10.2013 23:18, Alban Hertroys wrote:
> On Oct 24, 2013, at 18:10, maillists0@gmail.com wrote:
>
>> Thank you for the answers. I'm still confused. If fsync is not
>> replicated to the slave, then how is replication affected by a
>> corrupt master? If the master dies and there's a commit recorded in
>> the wal log that didn't actually happen, wouldn't the slave still
>> be expected to be in a sane state, with the wal logs accurately
>> reflecting what's on disk?
>>
>> Maybe I just don't understand streaming replication enough. The
>> docs seem to say that synchronous commits mean that the slave also
>> has to verify a write before a transaction is considered complete.
>> How does fsync affect the way/order in which statements are sent to
>> the slave for replication?
>
> What you're missing is that the master will be replicating corrupt
> data. That is, _if_ it gets corrupted of course. But, data corruption
> in a database has a tendency to go unnoticed for a while.

I think it's safe as long as you don't try to reuse the cluster after a
crash (be it due to OS error, power outage, ...). If the primary crashes
for any reasons, you have to start from scratch, otherwise there might
be silent corruption as you've described.

regards
Tomas


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

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: Increasing CPU usage of PostgreSQL
Следующее
От: Alan Nilsson
Дата:
Сообщение: Re: Segmentation fault: pg_upgrade 9.1 to 9.3: pg_dump: row number 0 is out of range 0..-1