Re: [HACKERS] logical replication launcher crash on buildfarm

2017-04-15 Thread Robert Haas
On Sat, Apr 15, 2017 at 12:01 AM, Tom Lane wrote: > Maybe we need to rethink the division of labor between parallel.c > and execParallel.c, but that would depend on somebody explaining > what the difference is in the first place. parallel.c handles general concerns related to

Re: [HACKERS] logical replication launcher crash on buildfarm

2017-04-15 Thread Tom Lane
Petr Jelinek writes: > On 15/04/17 06:01, Tom Lane wrote: >> I've had more than enough of seeing buildfarm failures from culicidae, >> so I whacked this around until I was happy with it and pushed it. >> Further adjustments welcome of course. > Thanks. Seems like

Re: [HACKERS] logical replication launcher crash on buildfarm

2017-04-15 Thread Petr Jelinek
On 15/04/17 06:01, Tom Lane wrote: > Petr Jelinek writes: >> So this is what I came up with on plane. Generalized the loading >> functionality into load_library_function which that can load either >> known postgres functions or call load_external_function. > > I've

Re: [HACKERS] logical replication launcher crash on buildfarm

2017-04-14 Thread Tom Lane
Petr Jelinek writes: > So this is what I came up with on plane. Generalized the loading > functionality into load_library_function which that can load either > known postgres functions or call load_external_function. I've had more than enough of seeing buildfarm

Re: [HACKERS] logical replication launcher crash on buildfarm

2017-04-05 Thread Robert Haas
On Tue, Apr 4, 2017 at 2:08 PM, Petr Jelinek wrote: > So this is what I came up with on plane. Generalized the loading > functionality into load_library_function which that can load either > known postgres functions or call load_external_function. > > I am not quite

Re: [HACKERS] logical replication launcher crash on buildfarm

2017-04-04 Thread Petr Jelinek
So this is what I came up with on plane. Generalized the loading functionality into load_library_function which that can load either known postgres functions or call load_external_function. I am not quite sure if fmgr.c is best place to put it, but I didn't want to include stuff from executor in

Re: [HACKERS] logical replication launcher crash on buildfarm

2017-03-31 Thread Petr Jelinek
On 01/04/17 04:19, Andres Freund wrote: > On 2017-03-31 21:30:17 -0400, Robert Haas wrote: >> On Fri, Mar 31, 2017 at 9:26 PM, Petr Jelinek >> wrote: Hmm, I don't know if there's any good reason not to just use strcmp(), but sure, OK. Committed and

Re: [HACKERS] logical replication launcher crash on buildfarm

2017-03-31 Thread Andres Freund
On 2017-03-31 21:30:17 -0400, Robert Haas wrote: > On Fri, Mar 31, 2017 at 9:26 PM, Petr Jelinek > wrote: > >> Hmm, I don't know if there's any good reason not to just use strcmp(), > >> but sure, OK. Committed and back-patched. > > > > Hmm culicidae still fails,

Re: [HACKERS] logical replication launcher crash on buildfarm

2017-03-31 Thread Andres Freund
On 2017-04-01 03:57:05 +0200, Petr Jelinek wrote: > On 01/04/17 03:44, Andres Freund wrote: > > On 2017-04-01 03:26:01 +0200, Petr Jelinek wrote: > >> On 01/04/17 02:53, Robert Haas wrote: > >>> On Fri, Mar 31, 2017 at 8:32 PM, Petr Jelinek > >>> wrote: > Right,

Re: [HACKERS] logical replication launcher crash on buildfarm

2017-03-31 Thread Petr Jelinek
On 01/04/17 03:44, Andres Freund wrote: > On 2017-04-01 03:26:01 +0200, Petr Jelinek wrote: >> On 01/04/17 02:53, Robert Haas wrote: >>> On Fri, Mar 31, 2017 at 8:32 PM, Petr Jelinek >>> wrote: Right, changed to BGW_MAXLEN. >>> >>> Hmm, I don't know if there's

Re: [HACKERS] logical replication launcher crash on buildfarm

2017-03-31 Thread Andres Freund
On 2017-04-01 03:26:01 +0200, Petr Jelinek wrote: > On 01/04/17 02:53, Robert Haas wrote: > > On Fri, Mar 31, 2017 at 8:32 PM, Petr Jelinek > > wrote: > >> Right, changed to BGW_MAXLEN. > > > > Hmm, I don't know if there's any good reason not to just use strcmp(), >

Re: [HACKERS] logical replication launcher crash on buildfarm

2017-03-31 Thread Robert Haas
On Fri, Mar 31, 2017 at 9:26 PM, Petr Jelinek wrote: >> Hmm, I don't know if there's any good reason not to just use strcmp(), >> but sure, OK. Committed and back-patched. > > Hmm culicidae still fails, this time only in parallel worker code. This > didn't happen on

Re: [HACKERS] logical replication launcher crash on buildfarm

2017-03-31 Thread Petr Jelinek
On 01/04/17 02:53, Robert Haas wrote: > On Fri, Mar 31, 2017 at 8:32 PM, Petr Jelinek > wrote: >> Right, changed to BGW_MAXLEN. > > Hmm, I don't know if there's any good reason not to just use strcmp(), > but sure, OK. Committed and back-patched. > Hmm culicidae

Re: [HACKERS] logical replication launcher crash on buildfarm

2017-03-31 Thread Robert Haas
On Fri, Mar 31, 2017 at 8:32 PM, Petr Jelinek wrote: > Right, changed to BGW_MAXLEN. Hmm, I don't know if there's any good reason not to just use strcmp(), but sure, OK. Committed and back-patched. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The

Re: [HACKERS] logical replication launcher crash on buildfarm

2017-03-31 Thread Petr Jelinek
On 31/03/17 15:42, Robert Haas wrote: > On Tue, Mar 28, 2017 at 7:39 PM, Petr Jelinek > wrote: >> Sigh, forgot git add for the docs, so one more try... > > +if (strncmp(worker->bgw_library_name, "postgres", 8) != 0) > +return NULL; > > I think that's

Re: [HACKERS] logical replication launcher crash on buildfarm

2017-03-31 Thread Robert Haas
On Tue, Mar 28, 2017 at 7:39 PM, Petr Jelinek wrote: > Sigh, forgot git add for the docs, so one more try... +if (strncmp(worker->bgw_library_name, "postgres", 8) != 0) +return NULL; I think that's not right. You don't want to match

Re: [HACKERS] logical replication launcher crash on buildfarm

2017-03-28 Thread Petr Jelinek
On 29/03/17 01:29, Petr Jelinek wrote: > On 28/03/17 18:05, Petr Jelinek wrote: >> On 28/03/17 17:55, Robert Haas wrote: >>> On Mon, Mar 27, 2017 at 11:20 PM, Petr Jelinek >>> wrote: On 28/03/17 04:46, Robert Haas wrote: > On Mon, Mar 27, 2017 at 10:04 PM,

Re: [HACKERS] logical replication launcher crash on buildfarm

2017-03-28 Thread Petr Jelinek
On 28/03/17 18:05, Petr Jelinek wrote: > On 28/03/17 17:55, Robert Haas wrote: >> On Mon, Mar 27, 2017 at 11:20 PM, Petr Jelinek >> wrote: >>> On 28/03/17 04:46, Robert Haas wrote: On Mon, Mar 27, 2017 at 10:04 PM, Andres Freund wrote:

Re: [HACKERS] logical replication launcher crash on buildfarm

2017-03-28 Thread Petr Jelinek
On 28/03/17 17:55, Robert Haas wrote: > On Mon, Mar 27, 2017 at 11:20 PM, Petr Jelinek > wrote: >> On 28/03/17 04:46, Robert Haas wrote: >>> On Mon, Mar 27, 2017 at 10:04 PM, Andres Freund wrote: > Btw now that I look at the code, I guess

Re: [HACKERS] logical replication launcher crash on buildfarm

2017-03-28 Thread Robert Haas
On Mon, Mar 27, 2017 at 11:20 PM, Petr Jelinek wrote: > On 28/03/17 04:46, Robert Haas wrote: >> On Mon, Mar 27, 2017 at 10:04 PM, Andres Freund wrote: Btw now that I look at the code, I guess we'll want to get rid of bgw_main

Re: [HACKERS] logical replication launcher crash on buildfarm

2017-03-27 Thread Petr Jelinek
On 28/03/17 04:46, Robert Haas wrote: > On Mon, Mar 27, 2017 at 10:04 PM, Andres Freund 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

Re: [HACKERS] logical replication launcher crash on buildfarm

2017-03-27 Thread Tom Lane
Robert Haas writes: > 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); >

Re: [HACKERS] logical replication launcher crash on buildfarm

2017-03-27 Thread Robert Haas
On Mon, Mar 27, 2017 at 10:04 PM, Andres Freund 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

Re: [HACKERS] logical replication launcher crash on buildfarm

2017-03-27 Thread Andres Freund
On 2017-03-28 03:47:50 +0200, Petr Jelinek wrote: > On 28/03/17 03:31, Petr Jelinek wrote: > > On 27/03/17 19:01, Robert Haas wrote: > >> On Mon, Mar 27, 2017 at 12:50 PM, Andres Freund wrote: > >>> Robert, Petr, either of you planning to fix this (as outlined elsewhere > >>>

Re: [HACKERS] logical replication launcher crash on buildfarm

2017-03-27 Thread Petr Jelinek
On 28/03/17 03:31, Petr Jelinek wrote: > On 27/03/17 19:01, Robert Haas wrote: >> On Mon, Mar 27, 2017 at 12:50 PM, Andres Freund wrote: >>> Robert, Petr, either of you planning to fix this (as outlined elsewhere >>> in the thred)? >> >> Oh, I didn't realize anybody was

Re: [HACKERS] logical replication launcher crash on buildfarm

2017-03-27 Thread Petr Jelinek
On 27/03/17 19:01, Robert Haas wrote: > On Mon, Mar 27, 2017 at 12:50 PM, Andres Freund wrote: >> Robert, Petr, either of you planning to fix this (as outlined elsewhere >> in the thred)? > > Oh, I didn't realize anybody was looking to me to fix this. I sort of > thought

Re: [HACKERS] logical replication launcher crash on buildfarm

2017-03-27 Thread Tom Lane
Robert Haas writes: > ... I don't have much > personal enthusiasm for trying to figure out how to make dynamic > loading on the postgres binary itself work everywhere, so if it falls > to me to fix, it's likely to get a hard-coded check for some > hard-coded name. +1.

Re: [HACKERS] logical replication launcher crash on buildfarm

2017-03-27 Thread Andres Freund
On 2017-03-27 13:01:11 -0400, Robert Haas wrote: > On Mon, Mar 27, 2017 at 12:50 PM, Andres Freund wrote: > > Robert, Petr, either of you planning to fix this (as outlined elsewhere > > in the thred)? > > Oh, I didn't realize anybody was looking to me to fix this. Well, it's

Re: [HACKERS] logical replication launcher crash on buildfarm

2017-03-27 Thread Robert Haas
On Mon, Mar 27, 2017 at 12:50 PM, Andres Freund wrote: > Robert, Petr, either of you planning to fix this (as outlined elsewhere > in the thred)? Oh, I didn't realize anybody was looking to me to fix this. I sort of thought that it was fallout from the logical replication

Re: [HACKERS] logical replication launcher crash on buildfarm

2017-03-27 Thread Andres Freund
On 2017-03-16 10:13:37 +0100, Petr Jelinek wrote: > On 16/03/17 09:53, Andres Freund wrote: > > On 2017-03-16 09:40:48 +0100, Petr Jelinek wrote: > >> On 16/03/17 04:42, Andres Freund wrote: > >>> On 2017-03-15 20:28:33 -0700, Andres Freund wrote: > Hi, > > I just unstuck a bunch of

Re: [HACKERS] logical replication launcher crash on buildfarm

2017-03-16 Thread Peter Eisentraut
On 3/16/17 14:55, Andres Freund wrote: > I indeed think that's the right consequence. One question is what to > replace it with exactly - are we guaranteed we can dynamically lookup > symbols by name in the main binary on every platform? I think there is probably a way to do this on all

Re: [HACKERS] logical replication launcher crash on buildfarm

2017-03-16 Thread Robert Haas
On Thu, Mar 16, 2017 at 2:55 PM, Andres Freund wrote: > I indeed think it's not safe, and it's going to get less and less safe > on windows (or EXEC_BACKEND). I don't think we can afford to disable > ASLR in the long run (I indeed supect that'll just be disallowed at some >

Re: [HACKERS] logical replication launcher crash on buildfarm

2017-03-16 Thread Andres Freund
On 2017-03-16 09:27:59 -0400, Robert Haas wrote: > On Thu, Mar 16, 2017 at 5:13 AM, Petr Jelinek > wrote: > > Hmm now that you mention it, I remember discussing something similar > > with you last year in Dallas in regards to parallel query. IIRC Windows > > should

Re: [HACKERS] logical replication launcher crash on buildfarm

2017-03-16 Thread Robert Haas
On Thu, Mar 16, 2017 at 5:13 AM, Petr Jelinek wrote: > Hmm now that you mention it, I remember discussing something similar > with you last year in Dallas in regards to parallel query. IIRC Windows > should not have this problem but other systems with EXEC_BACKEND

Re: [HACKERS] logical replication launcher crash on buildfarm

2017-03-16 Thread Petr Jelinek
On 16/03/17 09:53, Andres Freund wrote: > On 2017-03-16 09:40:48 +0100, Petr Jelinek wrote: >> On 16/03/17 04:42, Andres Freund wrote: >>> On 2017-03-15 20:28:33 -0700, Andres Freund wrote: Hi, I just unstuck a bunch of my buildfarm animals. That triggered some spurious

Re: [HACKERS] logical replication launcher crash on buildfarm

2017-03-16 Thread Andres Freund
On 2017-03-16 09:40:48 +0100, Petr Jelinek wrote: > On 16/03/17 04:42, Andres Freund wrote: > > On 2017-03-15 20:28:33 -0700, Andres Freund wrote: > >> Hi, > >> > >> I just unstuck a bunch of my buildfarm animals. That triggered some > >> spurious failures (on piculet, calliphoridae, mylodon),

Re: [HACKERS] logical replication launcher crash on buildfarm

2017-03-16 Thread Petr Jelinek
On 16/03/17 09:44, Andres Freund wrote: > On 2017-03-16 09:40:48 +0100, Petr Jelinek wrote: >> On 16/03/17 04:42, Andres Freund wrote: >>> On 2017-03-15 20:28:33 -0700, Andres Freund wrote: Hi, I just unstuck a bunch of my buildfarm animals. That triggered some spurious

Re: [HACKERS] logical replication launcher crash on buildfarm

2017-03-16 Thread Andres Freund
On 2017-03-16 09:40:48 +0100, Petr Jelinek wrote: > On 16/03/17 04:42, Andres Freund wrote: > > On 2017-03-15 20:28:33 -0700, Andres Freund wrote: > >> Hi, > >> > >> I just unstuck a bunch of my buildfarm animals. That triggered some > >> spurious failures (on piculet, calliphoridae, mylodon),

Re: [HACKERS] logical replication launcher crash on buildfarm

2017-03-16 Thread Petr Jelinek
On 16/03/17 04:42, Andres Freund wrote: > On 2017-03-15 20:28:33 -0700, Andres Freund wrote: >> Hi, >> >> I just unstuck a bunch of my buildfarm animals. That triggered some >> spurious failures (on piculet, calliphoridae, mylodon), but also one >> that doesn't really look like that: >>

Re: [HACKERS] logical replication launcher crash on buildfarm

2017-03-15 Thread Andres Freund
On 2017-03-15 20:28:33 -0700, Andres Freund wrote: > Hi, > > I just unstuck a bunch of my buildfarm animals. That triggered some > spurious failures (on piculet, calliphoridae, mylodon), but also one > that doesn't really look like that: >

[HACKERS] logical replication launcher crash on buildfarm

2017-03-15 Thread Andres Freund
Hi, I just unstuck a bunch of my buildfarm animals. That triggered some spurious failures (on piculet, calliphoridae, mylodon), but also one that doesn't really look like that: https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=culicidae=2017-03-16%2002%3A40%3A03 with the pertinent point