pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
To: Michael Paquier <michael@paquier.xyz>
Cc: petr.fedorov@phystech.edu
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15733: An insert destined at partition created after a column has been dropped from the parent table fails
Date: Fri, 5 Apr 2019 14:07:22 +0900
Message-ID: <1b1a2522-4edc-9eea-9883-a41c68eba1ba@lab.ntt.co.jp> (raw)
In-Reply-To: <2e86bcd1-1196-d8bf-ed39-b43f66802e4f@lab.ntt.co.jp>
References: <15733-7692379e310b80ec@postgresql.org>
	<20190404013510.GB7693@paquier.xyz>
	<f555e234-273f-9796-aae4-9dbdd9b360c5@lab.ntt.co.jp>
	<20190404104818.GM7693@paquier.xyz>
	<2e86bcd1-1196-d8bf-ed39-b43f66802e4f@lab.ntt.co.jp>

On 2019/04/05 12:22, Amit Langote wrote:
> On 2019/04/04 19:48, Michael Paquier wrote:
>> Perhaps it would make sense to have this test case on HEAD as well?
> 
> OK, I've divided the patch that adds tests into its own.
> 
>> It seems to me that there is little point in having a completely new
>> set of relations to test this issue knowing that multi-level
>> partitioning is already tested in the same file.  Why not extending
>> the part close to "more tests for certain multi-level partitioning
>> scenarios" in insert.sql with a mlparted111 or such a thing?  This
>> way, we have a three-layer partitioning and the error can be equally
>> triggered.
> 
> Done that way.
> 
> v2-0001_*, the test patch, can be applied to HEAD and PG 11 branches.  Of
> course, one would want to commit 0001 and 0002 together in PG 11, because
> you'll see the ERROR in the output in patch 0001, which is same as the
> reported error.
> 
> I've also modified 0001 so that it can be applied to PG 10, attached as
> pg10-0001*.
> 
> Both HEAD and PG 10 don't need any code changes.

I said v2-0001 could be applied unchanged to both HEAD and PG 11, but I
was wrong.  Tests without the code changes fail on PG 11, but they pass on
both PG 10 and HEAD as there's no bug in those branches.

Here are revised patches.

pg10-v3-0001 adds tests in PG 10 branch
pg11-v3-0001 adds tests in PG 11 branch t(tests fail which 0002 fixes)
pg11-v3-0002 fixes bug in PG 11 branch
HEAD-v3-0001 adds tests in HEAD branch

I also rewrote tests a bit too, expanding the comment, and finding even
more suitable place in insert.sql to add this test than v2.

Thanks,
Amit

Attachments:

  HEAD-v3-0001-Add-tests-for-a-fix-for-BUG-15733.patch (text/plain, 0B) download

view thread (8+ messages)  latest in thread

Message-ID: <1b1a2522-4edc-9eea-9883-a41c68eba1ba@lab.ntt.co.jp>
Permalink:  ../1b1a2522-4edc-9eea-9883-a41c68eba1ba@lab.ntt.co.jp/
Also on:    postgresql.org/message-id/1b1a2522-4edc-9eea-9883-a41c68eba1ba@lab.ntt.co.jp

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: Langote_Amit_f8@lab.ntt.co.jp, michael@paquier.xyz, petr.fedorov@phystech.edu
  Subject: Re: BUG #15733: An insert destined at partition created after a column has been dropped from the parent table fails
  In-Reply-To: <1b1a2522-4edc-9eea-9883-a41c68eba1ba@lab.ntt.co.jp>
  References: <15733-7692379e310b80ec@postgresql.org> <20190404013510.GB7693@paquier.xyz> <f555e234-273f-9796-aae4-9dbdd9b360c5@lab.ntt.co.jp> <20190404104818.GM7693@paquier.xyz> <2e86bcd1-1196-d8bf-ed39-b43f66802e4f@lab.ntt.co.jp> <1b1a2522-4edc-9eea-9883-a41c68eba1ba@lab.ntt.co.jp>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox