Re: pg_upgrade failed with ERROR: null relpartbound for relation 18159 error.

From: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Rajkumar Raghuwanshi <rajkumar(dot)raghuwanshi(at)enterprisedb(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_upgrade failed with ERROR: null relpartbound for relation 18159 error.
Date: 2018-10-05 07:55:51
Message-ID: ca50c117-2e77-d463-069c-bad52b79ff6f@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2018/10/05 16:05, Michael Paquier wrote:
>> As of commit 2fbdf1b38bc [1], which has been applied in 11 and HEAD
>> branches, RelationBuildPartitionDesc emits an error if we don't find
>> relpartbound set for a child found by scanning pg_inherits, instead of
>> skipping such children. While that commit switched the order of creating
>> pg_inherits entry and checking a new bound against existing bounds in
>> DefineRelation in light of aforementioned change, it didn't in
>> ATExecAttachPartition, hence this error.
>>
>> Attached patch fixes that.
>
> Could you please add a minimal regression test in your patch? That's
> the second bug related to ATTACH PARTITION I am looking at today..

OK, done, although I hope that's not bloating the tests.

>> I thought we'd need to apply this to 10, 11, HEAD, but I couldn't
>> reproduce this in 10. That's because the above commit wasn't applied to
>> 10, so the child that causes this error is being skipped in 10's case.
>
> Hmm. Indeed, v10 does not complain but HEAD does. (I ran the attached
> SQL file, which is the complete test case both of you have compiled).

Did you forget to attach some file?

Thanks,
Amit

Attachment Content-Type Size
for-10-v2.patch text/plain 6.4 KB
partition-create-inheritance-bug-v2.patch text/plain 3.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2018-10-05 08:04:22 Re: out-of-order XID insertion in KnownAssignedXids
Previous Message Masahiko Sawada 2018-10-05 07:32:00 Re: Function to promote standby servers