Re: logical replication launcher crash on buildfarm
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Andres Freund <andres@anarazel.de>
Cc: Petr Jelinek <petr.jelinek@2ndquadrant.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>,
Petr Jelinek <petr@2ndquadrant.com>, Peter Eisentraut <peter_e@gmx.net>
Date: 2017-03-28T02:46:00Z
Lists: pgsql-hackers
On Mon, Mar 27, 2017 at 10:04 PM, Andres Freund <andres@anarazel.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.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Commits
-
Avoid passing function pointers across process boundaries.
- 9c225acf0b97 9.6.3 landed
- 32470825d36d 10.0 landed
-
Don't use bgw_main even to specify in-core bgworker entrypoints.
- 0ef26bb394ab 9.5.7 landed
- 9b6e8d8f86ac 9.6.3 landed
- 2113ac4cbb12 10.0 landed