Re: WAL consistency check facility

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: WAL consistency check facility
Дата
Msg-id CA+TgmoaxQJd5mRM7ETZaoA5RkiSMvmG7oHKAFVM0zmOCUKEFcA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: WAL consistency check facility  (Michael Paquier <michael.paquier@gmail.com>)
Ответы Re: WAL consistency check facility  (Amit Kapila <amit.kapila16@gmail.com>)
Re: WAL consistency check facility  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-hackers
On Sat, Sep 10, 2016 at 3:19 AM, Michael Paquier
<michael.paquier@gmail.com> wrote:
> On Fri, Sep 9, 2016 at 4:01 PM, Kuntal Ghosh <kuntalghosh.2007@gmail.com> wrote:
>>>> - If WAL consistency check is enabled for a rmgrID, we always include
>>>> the backup image in the WAL record.
>>>
>>> What happens if wal_consistency has different settings on a standby
>>> and its master? If for example it is set to 'all' on the standby, and
>>> 'none' on the master, or vice-versa, how do things react? An update of
>>> this parameter should be WAL-logged, no?
>>>
>> It is possible to set wal_consistency to 'All' in master and any other
>> values in standby. But, the scenario you mentioned will cause error in
>> standby since it may not get the required backup image for wal
>> consistency check. I think that user should be responsible to set
>> this value correctly. We can improve the error message to make the
>> user aware of the situation.
>
> Let's be careful here. You should as well consider things from the
> angle that some parameter updates are WAL-logged as well, like
> wal_level with the WAL record XLOG_PARAMETER_CHANGE.

It seems entirely unnecessary for the master and the standby to agree
here.  I think what we need is two GUCs.  One of them, which affects
only the master, controls whether the validation information is
including in the WAL, and the other, which affects only the standby,
affects whether validation is performed when the necessary information
is present.  Or maybe skip the second one and just decree that
standbys will always validate if the necessary information is present.
Using the same GUC on both the master and the standby but making it
mean different things in each of those places (whether to log the
validation info in one case, whether to perform validation in the
other case) is another option that also avoids needing to enforce that
the setting is the same in both places, but probably an inferior one.

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



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: An extra error for client disconnection on Windows
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Allow to_date() and to_timestamp() to accept localized month names