pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: skaurus@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15437: Segfault during insert into declarative partitioned table with a trigger creating partition
Date: Mon, 29 Oct 2018 15:57:14 +0900
Message-ID: <20181029065714.GI14242@paquier.xyz> (raw)
In-Reply-To: <39fc3c42-d34e-794b-184e-4ff2481245e3@lab.ntt.co.jp>
References: <15437-3fe01ee66bd1bae1@postgresql.org>
	<e8079b1f-3e41-d1dc-1575-ff3cce7d76ac@lab.ntt.co.jp>
	<8213.1539917571@sss.pgh.pa.us>
	<ddc70376-9ddb-8637-eb69-aa7ae6f13378@lab.ntt.co.jp>
	<20181029033117.GE14242@paquier.xyz>
	<39fc3c42-d34e-794b-184e-4ff2481245e3@lab.ntt.co.jp>

On Mon, Oct 29, 2018 at 02:28:53PM +0900, Amit Langote wrote:
> On 2018/10/29 12:31, Michael Paquier wrote:
>> In the case of a partition, the execution state relies on the data
>> inserted, so the restriction sounds fine to me.  If one tries to attach
>> a partition after creating a table you actually get an error:
>> ERROR:  55006: cannot ALTER TABLE "check_not_in_use" because it is being
>> used by active queries in this session
>> CONTEXT:  SQL statement "alter table check_not_in_use attach partition
>> check_not_in_use1 for values IN (1);"
> 
> Yeah, I forgot to include this example in my previous emails.

We may want to add a new test for this one in the same spirit as what
has been sent in the previous patch.

>> Other callers of CheckTableNotInUse() use command tags, which is
>> inconsistent here, still I cannot think of anything better than
>> CREATE TABLE "%s" PARTITION OF
>> or:
>> CREATE TABLE .. PARTITION OF
> 
> Maybe the latter is fine, because we want to highlight the parent table's
> name, not partition's.

Fine by me.
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (22+ messages)  latest in thread

Message-ID: <20181029065714.GI14242@paquier.xyz>
Permalink:  ../20181029065714.GI14242@paquier.xyz/
Also on:    postgresql.org/message-id/20181029065714.GI14242@paquier.xyz

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: michael@paquier.xyz, Langote_Amit_f8@lab.ntt.co.jp, tgl@sss.pgh.pa.us, skaurus@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #15437: Segfault during insert into declarative partitioned table with a trigger creating partition
  In-Reply-To: <20181029065714.GI14242@paquier.xyz>

* 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