Double invocation of InitPostmasterChild in bgworker with -DEXEC_BACKEND - Mailing list pgsql-hackers

From Thomas Munro
Subject Double invocation of InitPostmasterChild in bgworker with -DEXEC_BACKEND
Date
Msg-id CAEepm=1VOnbVx4wsgQFvj94hu9jVt2nVabCr7QiooUSvPJXkgQ@mail.gmail.com
Whole thread Raw
Responses Re: Double invocation of InitPostmasterChild in bgworker with -DEXEC_BACKEND  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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

pgsql-hackers by date:

Previous
From: Kouhei Kaigai
Date:
Subject: Re: Oddity in EXPLAIN for foreign/custom join pushdown plans
Next
From: Kyotaro HORIGUCHI
Date:
Subject: Re: Wrong defeinition of pq_putmessage_noblock since 9.5