Re: logical replication launcher crash on buildfarm

From: Petr Jelinek <petr(dot)jelinek(at)2ndquadrant(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Petr Jelinek <petr(at)2ndquadrant(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>
Subject: Re: logical replication launcher crash on buildfarm
Date: 2017-03-28 03:20:44
Message-ID: e3c35f3a-426d-b1ca-7fe5-9241c2717013@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 28/03/17 04:46, Robert Haas wrote:
> On Mon, Mar 27, 2017 at 10:04 PM, Andres Freund <andres(at)anarazel(dot)de> wrote:
>>> Btw now that I look at the code, I guess we'll want to get rid of
>>> bgw_main completely in HEAD given that we can't guarantee it will be
>>> valid even for shared_preload_library libraries. For older branches I
>>> would leave things as they are in this regard as there don't seem to be
>>> any immediate issue for standard binaries.
>>
>> As long as you fix it so culicidae is happy (in 9.6) ;). I think it's
>> fine to just introduce bgw_builtin_id or such, and leave the bgw_main
>> code in place in < HEAD.
>
> I wasn't thinking of introducing bgw_builtin_id. My idea was just
> along the lines of
>
> if (bgw_library_name == NULL && bgw_function_name != NULL)
> {
> if (strcmp(bgw_function_name, "ParallelQueryMain") == 0)
> ParallelQueryMain(blah);
> else if (strcmp(bgw_function_name, "LogicalReplicationMain") == 0)
> LogicalReplicationMain(blah);
> }
>
> I think something like that is certainly better for the back-branches,
> because it doesn't cause an ABI break. But I think it would also be
> fine for master.
>

I had something slightly more complex like the attached in mind.

--
Petr Jelinek http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

Attachment Content-Type Size
0001-Remove-bgw_main-from-bgworker-and-always-use-library.patch binary/octet-stream 10.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2017-03-28 03:23:09 Re: logical decoding of two-phase transactions
Previous Message Pavan Deolasee 2017-03-28 03:11:51 Re: Patch: Write Amplification Reduction Method (WARM)