Double invocation of InitPostmasterChild in bgworker with -DEXEC_BACKEND

From: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Double invocation of InitPostmasterChild in bgworker with -DEXEC_BACKEND
Date: 2016-07-29 05:39:48
Message-ID: CAEepm=1VOnbVx4wsgQFvj94hu9jVt2nVabCr7QiooUSvPJXkgQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi

I discovered that if you build with -DEXEC_BACKEND on a Unix system
and then try to start a background worker, it dies in
InitializeLatchSupport:

TRAP: FailedAssertion("!(selfpipe_readfd == -1)", File: "latch.c", Line: 161)

That's because InitPostmasterChild is called twice. I can
successfully use regular parallel query workers and bgworkers created
by extensions if I apply the attached patch.

--
Thomas Munro
http://www.enterprisedb.com

Attachment Content-Type Size
fix.patch application/octet-stream 474 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro HORIGUCHI 2016-07-29 05:55:12 Re: Wrong defeinition of pq_putmessage_noblock since 9.5
Previous Message Kouhei Kaigai 2016-07-29 04:52:11 Re: Oddity in EXPLAIN for foreign/custom join pushdown plans