Re: [HACKERS] segfault in HEAD when too many nested functions call - Mailing list pgsql-hackers

From Andres Freund
Subject Re: [HACKERS] segfault in HEAD when too many nested functions call
Date
Msg-id 20170726195832.sxhv4jsknasdmmvv@alap3.anarazel.de
Whole thread Raw
In response to Re: [HACKERS] segfault in HEAD when too many nested functions call  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [HACKERS] segfault in HEAD when too many nested functions call
List pgsql-hackers
On 2017-07-26 15:03:37 -0400, Tom Lane wrote:
> Andres Freund <andres@anarazel.de> writes:
> > I've moved the CHECK_FOR_INTERRUPTS() to the callsites. That
> > unsurprisingly ends up being somewhat verbose, and there's a bunch of
> > minor judgement calls where exactly to place them. While doing so I've
> > also added a few extra ones.  Did this in a separate patch to make it
> > easier to review.
> 
> Hm, that seems kinda backwards to me; I was envisioning the checks
> moving to the callees not the callers.  I think it'd end up being
> about the same number of occurrences of CHECK_FOR_INTERRUPTS(),
> and there would be less of a judgment call about where to put them.

Hm, that seems a bit riskier - easy to forget one of the places where we
might need a CFI(). We certainly are missing a bunch of them in various
nodes - I tried to add ones I saw as missing, but it's quite some
code. Keeping them close to ExecProcNode() makes that call easier.  I'm
not quite seing how solely putting them in callees removes the judgement
call issue?

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: [HACKERS] pg_dump does not handle indirectly-granted permissions properly
Next
From: Andrew Dunstan
Date:
Subject: Re: [HACKERS] Testlib.pm vs msys