From: Tom Lane <tgl@sss.pgh.pa.us>
To: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
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: Thu, 18 Oct 2018 22:52:51 -0400
Message-ID: <8213.1539917571@sss.pgh.pa.us> (raw)
In-Reply-To: <e8079b1f-3e41-d1dc-1575-ff3cce7d76ac@lab.ntt.co.jp>
References: <15437-3fe01ee66bd1bae1@postgresql.org>
<e8079b1f-3e41-d1dc-1575-ff3cce7d76ac@lab.ntt.co.jp>
Amit Langote <Langote_Amit_f8@lab.ntt.co.jp> writes:
> On 2018/10/18 20:57, PG Bug reporting form wrote:
>> I tried to use declarative partitioning and, to avoid creating partitions by
>> hand, to make them in ON BEFORE STATEMENT trigger. Trigger executes
>> successfully (proved that with RAISE NOTICE), but server crashes.
> The problem here is with the server allowing to create a partition of the
> table being inserted into, inside the table's BEFORE INSERT trigger.
> Generally speaking, the command that's run inside the trigger shouldn't
> have been allowed to proceed if it might change the table's properties
> that the execution of the ongoing command is depending upon.
Check.
> I propose the attached to fix that.
Hmm ... I wonder if we shouldn't do CheckTableNotInUse for *both* cases,
is_partition or no?
regards, tom lane
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: tgl@sss.pgh.pa.us, Langote_Amit_f8@lab.ntt.co.jp, 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: <8213.1539917571@sss.pgh.pa.us>
* 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