Re: XLOG_PARAMETER_CHANGE handling of wal_log_hints

Lists: pgsql-hackers
From: Petr Jelinek <petr(at)2ndquadrant(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: XLOG_PARAMETER_CHANGE handling of wal_log_hints
Date: 2015-01-06 19:24:41
Message-ID: 54AC3679.2070807@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hi,

when I was fixing how commit_ts handles the XLOG_PARAMETER_CHANGE I
noticed that for wal_log_hints we assign the value in ControFile to
current value instead of value that comes from WAL.

ISTM it has just information value so it should not have any practical
impact, but it looks like a bug anyway so here is simple patch to change
that.

--
Petr Jelinek http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

Attachment Content-Type Size
wal_log_hints_controlfile-fix.patch text/x-diff 594 bytes

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Petr Jelinek <petr(at)2ndquadrant(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: XLOG_PARAMETER_CHANGE handling of wal_log_hints
Date: 2015-01-06 23:59:42
Message-ID: CAB7nPqT9ALQ3e8+CNY1g=ubsKHRSC5UFBh4BSmu12pYHcMzy=Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Wed, Jan 7, 2015 at 4:24 AM, Petr Jelinek <petr(at)2ndquadrant(dot)com> wrote:
> Hi,
>
> when I was fixing how commit_ts handles the XLOG_PARAMETER_CHANGE I noticed
> that for wal_log_hints we assign the value in ControFile to current value
> instead of value that comes from WAL.
>
> ISTM it has just information value so it should not have any practical
> impact, but it looks like a bug anyway so here is simple patch to change
> that.
Right. That's something that should get fixed in 9.4 as well..

ControlFile->track_commit_timestamp = track_commit_timestamp;
The new value of track_commit_timestamp should be taken as well from
xlrec on master btw.
--
Michael


From: Petr Jelinek <petr(at)2ndquadrant(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: XLOG_PARAMETER_CHANGE handling of wal_log_hints
Date: 2015-01-07 09:53:59
Message-ID: 54AD0237.4080306@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 07/01/15 00:59, Michael Paquier wrote:
> On Wed, Jan 7, 2015 at 4:24 AM, Petr Jelinek <petr(at)2ndquadrant(dot)com> wrote:
>> Hi,
>>
>> when I was fixing how commit_ts handles the XLOG_PARAMETER_CHANGE I noticed
>> that for wal_log_hints we assign the value in ControFile to current value
>> instead of value that comes from WAL.
>>
>> ISTM it has just information value so it should not have any practical
>> impact, but it looks like a bug anyway so here is simple patch to change
>> that.
> Right. That's something that should get fixed in 9.4 as well..
>
> ControlFile->track_commit_timestamp = track_commit_timestamp;
> The new value of track_commit_timestamp should be taken as well from
> xlrec on master btw.
>

That's part of the larger fix for CommitTs that I sent separately in
response to the bug report from Fujii - there is much more to be done
there for CommitTs than just this.

--
Petr Jelinek http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services


From: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
To: Petr Jelinek <petr(at)2ndquadrant(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: XLOG_PARAMETER_CHANGE handling of wal_log_hints
Date: 2015-01-15 18:57:36
Message-ID: 54B80DA0.9000704@vmware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 01/07/2015 11:53 AM, Petr Jelinek wrote:
> On 07/01/15 00:59, Michael Paquier wrote:
>> On Wed, Jan 7, 2015 at 4:24 AM, Petr Jelinek <petr(at)2ndquadrant(dot)com> wrote:
>>> Hi,
>>>
>>> when I was fixing how commit_ts handles the XLOG_PARAMETER_CHANGE I noticed
>>> that for wal_log_hints we assign the value in ControFile to current value
>>> instead of value that comes from WAL.
>>>
>>> ISTM it has just information value so it should not have any practical
>>> impact, but it looks like a bug anyway so here is simple patch to change
>>> that.
>> Right. That's something that should get fixed in 9.4 as well..
>>
>> ControlFile->track_commit_timestamp = track_commit_timestamp;
>> The new value of track_commit_timestamp should be taken as well from
>> xlrec on master btw.
>
> That's part of the larger fix for CommitTs that I sent separately in
> response to the bug report from Fujii - there is much more to be done
> there for CommitTs than just this.

Pushed this part now. I'll let you and Fujii handle that larger fix. Thanks!

- Heikki