Re: Double invocation of InitPostmasterChild in bgworker with -DEXEC_BACKEND

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Double invocation of InitPostmasterChild in bgworker with -DEXEC_BACKEND
Date: 2016-08-02 22:40:37
Message-ID: 10230.1470177637@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com> writes:
> 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.

Confirmed, fix pushed. I wonder if we should have a buildfarm member
running the Unix EXEC_BACKEND code ...

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2016-08-02 23:02:38 Re: Changed SRF in targetlist handling
Previous Message Alvaro Herrera 2016-08-02 22:21:03 Re: Increasing timeout of poll_query_until for TAP tests