From: | amul sul <sulamul(at)gmail(dot)com> |
---|---|
To: | Andres Freund <andres(at)anarazel(dot)de> |
Cc: | Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>, Peter Geoghegan <pg(at)bowt(dot)ie>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com> |
Subject: | Re: wal_consistency_checking reports an inconsistency on master branch |
Date: | 2018-04-13 08:45:35 |
Message-ID: | CAAJ_b95XnGnUnxRfTjq__ATeysD_nVS1vz9x4+mx-LaCeQrQhg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Apr 13, 2018 at 9:06 AM, Andres Freund <andres(at)anarazel(dot)de> wrote:
> On 2018-04-13 12:29:21 +0900, Amit Langote wrote:
>> On 2018/04/13 7:36, Peter Geoghegan wrote:
>> > On Thu, Apr 12, 2018 at 11:47 AM, Peter Geoghegan <pg(at)bowt(dot)ie> wrote:
>> >> In short, it looks like the tests added to update.sql by commit
>> >> 2f178441 ("Allow UPDATE to move rows between partitions") lead to this
>> >> failure, since I always hit a problem when update.sql is reached. I
>> >> haven't gone to the trouble of digging any deeper than that just yet.
>> >
>> > Without having looked at it in much detail, this seems rather more
>> > likely to be the fault of 2f178441. That was recent enough that it's
>> > easy to believe that I'd be the first to notice it, and actually has
>> > on-disk changes, in the form of ItemPointerSetMovedPartitions().
>>
>> I think you meant f16241bef7cc2 (Raise error when affecting tuple moved
>> into different partition), because it's the one that adds
>> ItemPointerSetMovedPartitions. Commit 2f178441 you quoted added the test
>> that triggered the failure.
>
> Right. Amul, have you looked at this?
>
I have looked into this and found that the issue is in heap_xlog_delete -- we
have missed to set the correct offset number from the target_tid when
XLH_DELETE_IS_PARTITION_MOVE flag is set.
Please find the attached patch does the correction and a big thanks to
Peter for the bug report.
Regards,
Amul
Attachment | Content-Type | Size |
---|---|---|
fix_installcheck_failure_due_to_MovedPartitions.patch | application/octet-stream | 563 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Langote | 2018-04-13 09:55:30 | Re: Boolean partitions syntax |
Previous Message | Kyotaro HORIGUCHI | 2018-04-13 08:34:31 | Re: Problem while setting the fpw with SIGHUP |