Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dc1aL-0002fy-9N for pgsql-bugs@arkaria.postgresql.org; Mon, 31 Jul 2017 03:41:37 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dc1aK-0005BE-H5 for pgsql-bugs@arkaria.postgresql.org; Mon, 31 Jul 2017 03:41:36 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dc1aF-00056j-TL for pgsql-bugs@postgresql.org; Mon, 31 Jul 2017 03:41:32 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dc1a9-0005vK-Ak for pgsql-bugs@postgresql.org; Mon, 31 Jul 2017 03:41:30 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v6V3fL6N000695; Sun, 30 Jul 2017 23:41:21 -0400 From: Tom Lane To: Amit Kapila cc: Andres Freund , Rick Otten , Robert Haas , PostgreSQL mailing lists Subject: Re: signal 11 segfaults with parallel workers In-reply-to: References: <20170728190201.4qcnarf57mq5qapf@alvherre.pgsql> <20250.1501428173@sss.pgh.pa.us> <20170731025616.d4gleu5qlrfckcxr@alap3.anarazel.de> Comments: In-reply-to Amit Kapila message dated "Mon, 31 Jul 2017 08:52:44 +0530" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <693.1501472481.1@sss.pgh.pa.us> Date: Sun, 30 Jul 2017 23:41:21 -0400 Message-ID: <694.1501472481@sss.pgh.pa.us> List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Amit Kapila writes: > There is already a "Parallel Worker" memory context defined by that > time. I think the issue is that multicorn library expects that > Transaction context to be defined by that time. It looks like multicorn supposes that a library's _PG_init function can only be called inside a transaction. That is broken with a capital B. We need not consider parallel query to find counterexamples: that means you can't preload multicorn using shared_preload_libraries, as that loads libraries into the postmaster, which never has and never will run transactions. Whatever it's trying to initialize in _PG_init needs to be done later. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs