Re: Double invocation of InitPostmasterChild in bgworker with -DEXEC_BACKEND

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Double invocation of InitPostmasterChild in bgworker with -DEXEC_BACKEND
Date: 2016-08-04 18:09:20
Message-ID: CA+TgmobuL4O-J3nLSyAQt2+za=vtY=x_rpOdkYzicqS3yh2aqA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Aug 2, 2016 at 6:40 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> 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 ...

That would get my vote.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2016-08-04 18:15:43 Re: Pgbench performance tuning?
Previous Message Tom Lane 2016-08-04 18:08:57 Re: improved DefElem list processing