Re: Logging WAL when updating hintbit

From: Sawada Masahiko <sawada(dot)mshk(at)gmail(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Jeff Davis <pgsql(at)j-davis(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Logging WAL when updating hintbit
Date: 2013-12-04 01:53:57
Message-ID: CAD21AoBFBkm91A9YbB3F6SqXHFKke4KHSXkKTczMuqUUFiANaQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Dec 3, 2013 at 5:34 PM, Sawada Masahiko <sawada(dot)mshk(at)gmail(dot)com> wrote:
> On Tue, Dec 3, 2013 at 4:28 PM, Michael Paquier
> <michael(dot)paquier(at)gmail(dot)com> wrote:
>> On Tue, Dec 3, 2013 at 3:30 PM, Sawada Masahiko <sawada(dot)mshk(at)gmail(dot)com> wrote:
>>
>> After more thinking...
>> Before performing a rewind on a node, what we need to know is that
>> log_hint_bits was set to true when WAL forked, because of the issue
>> that Robert mentioned here:
>> http://www.postgresql.org/message-id/519E5493.5060800@vmware.com
>> It does not really matter if the node used log_hint_bits set to false
>> in its latest state (Node to-be-rewinded might have been restarted
>> after WAL forked).
>>
>> So, after more thinking, yes using XLOG_PARAMETER_CHANGE and
>> PGC_POSTMASTER for this parameter would be enough. However on the
>> pg_rewind side we would need to track the value of log_hint_bits when
>> analyzing the WALs and ensure that it was set to true at fork point.
>> This is not something that the core should about though.
>
> Yep, pg_rewind needs to track the value of wal_log_hintbits.
> I think value of wal_log_hintbits always needs to have been set true
> after fork point.
> And if wal_log_hintbits is set false when we perform pg_rewind, we can not that.
>

I attached the patch which have modified based on Robert suggestion,
and fixed typo.

Regards,

-------
Sawada Masahiko

Attachment Content-Type Size
log_hint_bit_wal_v6.patch application/octet-stream 9.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message KONDO Mitsumasa 2013-12-04 02:13:58 Re: Time-Delayed Standbys
Previous Message Andres Freund 2013-12-04 00:57:05 Re: logical changeset generation v6.7