Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dXZVB-0000LD-Gw for pgsql-hackers@arkaria.postgresql.org; Tue, 18 Jul 2017 20:53:53 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dXZVA-0000YO-GR for pgsql-hackers@arkaria.postgresql.org; Tue, 18 Jul 2017 20:53:52 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dXZV9-0000YE-TL for pgsql-hackers@postgresql.org; Tue, 18 Jul 2017 20:53:51 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dXZV6-0006pT-Qk for pgsql-hackers@postgresql.org; Tue, 18 Jul 2017 20:53:51 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v6IKrha8006688; Tue, 18 Jul 2017 16:53:43 -0400 From: Tom Lane To: Andres Freund cc: Julien Rouhaud , pgsql-hackers Subject: Re: segfault in HEAD when too many nested functions call In-reply-to: <20170717145710.cm32m4yn555hsoxd@alap3.anarazel.de> References: <12302.1500132157@sss.pgh.pa.us> <20170717072629.dqykbsot2irdob7c@alap3.anarazel.de> <20170717145710.cm32m4yn555hsoxd@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Mon, 17 Jul 2017 07:57:10 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <6686.1500411223.1@sss.pgh.pa.us> Date: Tue, 18 Jul 2017 16:53:43 -0400 Message-ID: <6687.1500411223@sss.pgh.pa.us> List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Andres Freund writes: > ... If we were to go this route we'd have to probably move > the callback assignment into the ExecInit* routines, and possibly > replace the switch in ExecInitNode() with another callback, assigned in > make_*, and implement callbacks for ExecShutdown, MultiExecProcNode etc. BTW, I don't see why you really need to mess with anything except ExecProcNode? Surely the other cases such as MultiExecProcNode are not called often enough to justify changing them away from the switch technology. Yeah, maybe it would be a bit cleaner if they all looked alike ... but if you're trying to make a patch that's as little invasive as possible for v10, I'd suggest converting just ExecProcNode to this style. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers