Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gGztl-0005s9-3C for pgsql-bugs@arkaria.postgresql.org; Mon, 29 Oct 2018 05:15:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gGztj-0005ma-CT for pgsql-bugs@arkaria.postgresql.org; Mon, 29 Oct 2018 05:15:31 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gGztj-0005mT-5v for pgsql-bugs@lists.postgresql.org; Mon, 29 Oct 2018 05:15:31 +0000 Received: from tama50.ecl.ntt.co.jp ([129.60.39.147]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gGztY-0003oA-NG for pgsql-bugs@lists.postgresql.org; Mon, 29 Oct 2018 05:15:30 +0000 Received: from vc1.ecl.ntt.co.jp (vc1.ecl.ntt.co.jp [129.60.86.153]) by tama50.ecl.ntt.co.jp (8.13.8/8.13.8) with ESMTP id w9T5FF4k007989; Mon, 29 Oct 2018 14:15:15 +0900 Received: from vc1.ecl.ntt.co.jp (localhost [127.0.0.1]) by vc1.ecl.ntt.co.jp (Postfix) with ESMTP id 598EAEA7EFA; Mon, 29 Oct 2018 14:15:15 +0900 (JST) Received: from jcms-pop21.ecl.ntt.co.jp (jcms-pop21.ecl.ntt.co.jp [129.60.87.134]) by vc1.ecl.ntt.co.jp (Postfix) with ESMTP id 4CFDFEA7EC6; Mon, 29 Oct 2018 14:15:15 +0900 (JST) Received: from [127.0.0.1] (unknown [129.60.241.61]) by jcms-pop21.ecl.ntt.co.jp (Postfix) with ESMTPSA id 447AD400C16; Mon, 29 Oct 2018 14:15:15 +0900 (JST) Subject: Re: BUG #15437: Segfault during insert into declarative partitioned table with a trigger creating partition References: <15437-3fe01ee66bd1bae1@postgresql.org> <8213.1539917571@sss.pgh.pa.us> <20181029024459.GD14242@paquier.xyz> From: Amit Langote Message-ID: <5d9c4f7a-52aa-a8bb-9a52-e93118f56a40@lab.ntt.co.jp> Date: Mon, 29 Oct 2018 14:15:06 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20181029024459.GD14242@paquier.xyz> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit X-CC-Mail-RelayStamp: 1 To: Michael Paquier , Dmitry Shalashov Cc: Tom Lane , pgsql-bugs@lists.postgresql.org X-TM-AS-MML: disable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2018/10/29 11:44, Michael Paquier wrote: > On Fri, Oct 19, 2018 at 12:38:09PM +0300, Dmitry Shalashov wrote: >> That may be off-topic here, but I feel that *some* way of auto-creating >> partitions would be useful though. Maybe all partitioning setup could >> boil down to one table declaration, with auto-created partitions of >> the same structure, including indices and stuff. > > Some patches have been proposed for this purpose during v11 development > timeline if I recall correctly, but they did not cross the finish line. Hmm, I don't recall any, but maybe I missed some thread. > You could also look at something like pg_partman: > https://github.com/pgpartman/pg_partman I haven't looked at how pg_partman does it, but I suspect it's not doing it inside a trigger or we would've heard of this crash from pg_partman's developers. :) I don't hear you saying it does, but just thought I'd mention it. Thanks, Amit