Re: Null commitTS bug

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
Cc: kingsboa(at)amazon(dot)com, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Null commitTS bug
Date: 2022-01-17 03:45:35
Message-ID: YeTmXxUZPAtr4AJc@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jan 17, 2022 at 11:17:24AM +0900, Kyotaro Horiguchi wrote:
> At Fri, 14 Jan 2022 22:49:59 +0000, "Kingsborough, Alex" <kingsboa(at)amazon(dot)com> wrote in
>> The fix for this is very simple
>>
>>
>> /* if we wrote out all subxids, we're done. /
>> - if (j + 1 >= nsubxids)
>> + if (j >= nsubxids)
>> break;
>
> It looks like a thinko and the fix is correct. (It's a matter of taste
> choosing between it and "j == nsubxids").

It took me some time to understand the problem from the current code,
but I'd like to think that the suggested fix is less confusing.

> I found some confusing lines around but they need not a fix
> considering back-patching conflict?
>
>> for (i = 0, headxid = xid;;)
> ..
>> i += j - i + 1;

I am not sure. Do you have anything specific in mind? Perhaps
something that would help in making the code logic easier to follow?
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2022-01-17 03:56:06 Re: Refactoring of compression options in pg_basebackup
Previous Message Amit Kapila 2022-01-17 03:15:51 Re: Consistently use the function name CreateCheckPoint instead of CreateCheckpoint in code comments