pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: Rick Otten <rottenwindfish@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: PostgreSQL mailing lists <pgsql-bugs@postgresql.org>
Subject: Re: signal 11 segfaults with parallel workers
Date: Sun, 30 Jul 2017 23:41:21 -0400
Message-ID: <694.1501472481@sss.pgh.pa.us> (raw)
In-Reply-To: <CAA4eK1LSY9sM+2RjPsiY1cyY2q3WEUarWrtKN-yqZaLKxzChHQ@mail.gmail.com>
References: <CAMAYy4+ek5FxjgE3K7aoWv4AD0x7RMoCFbb-D2Tq-4fhKYfKwQ@mail.gmail.com>
	<20170728190201.4qcnarf57mq5qapf@alvherre.pgsql>
	<CAMAYy4J078FHsWhNk3JAJSoAPfEx4E423op+oAxgZMdFjsba_A@mail.gmail.com>
	<20250.1501428173@sss.pgh.pa.us>
	<CAMAYy4LaWA8nSWxpgaMp4F-E0uoB2PAstPXidVbQdhq-T7Fagw@mail.gmail.com>
	<CAMAYy4LwudXQ326o-xZdf2WZiWrA8iu8S6FNPxcPtvPN0b1xRw@mail.gmail.com>
	<20170731025616.d4gleu5qlrfckcxr@alap3.anarazel.de>
	<CAA4eK1LSY9sM+2RjPsiY1cyY2q3WEUarWrtKN-yqZaLKxzChHQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

Amit Kapila <amit.kapila16@gmail.com> 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



view thread (24+ messages)  latest in thread

Message-ID: <694.1501472481@sss.pgh.pa.us>
Permalink:  ../694.1501472481@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/694.1501472481@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, amit.kapila16@gmail.com, andres@anarazel.de, rottenwindfish@gmail.com, robertmhaas@gmail.com
  Subject: Re: signal 11 segfaults with parallel workers
  In-Reply-To: <694.1501472481@sss.pgh.pa.us>
  References: <CAMAYy4+ek5FxjgE3K7aoWv4AD0x7RMoCFbb-D2Tq-4fhKYfKwQ@mail.gmail.com> <20170728190201.4qcnarf57mq5qapf@alvherre.pgsql> <CAMAYy4J078FHsWhNk3JAJSoAPfEx4E423op+oAxgZMdFjsba_A@mail.gmail.com> <20250.1501428173@sss.pgh.pa.us> <CAMAYy4LaWA8nSWxpgaMp4F-E0uoB2PAstPXidVbQdhq-T7Fagw@mail.gmail.com> <CAMAYy4LwudXQ326o-xZdf2WZiWrA8iu8S6FNPxcPtvPN0b1xRw@mail.gmail.com> <20170731025616.d4gleu5qlrfckcxr@alap3.anarazel.de> <CAA4eK1LSY9sM+2RjPsiY1cyY2q3WEUarWrtKN-yqZaLKxzChHQ@mail.gmail.com> <694.1501472481@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