Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UQ4S1-0001T8-1i for pgsql-general@arkaria.postgresql.org; Wed, 10 Apr 2013 23:29:13 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UQ4S0-00006a-Hw for pgsql-general@arkaria.postgresql.org; Wed, 10 Apr 2013 23:29:12 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UQ4Ry-00005H-VH for pgsql-general@postgresql.org; Wed, 10 Apr 2013 23:29:11 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UQ4Rw-0003Ai-Rv for pgsql-general@postgresql.org; Wed, 10 Apr 2013 23:29:10 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id r3ANT6Tf013613; Wed, 10 Apr 2013 19:29:06 -0400 (EDT) From: Tom Lane To: Andres Freund cc: Joshua Berry , PostgreSQL - General Subject: Re: Segmentation fault with core dump In-reply-to: <20130410232131.GD7547@awork2.anarazel.de> References: <20130410214929.GA7547@awork2.anarazel.de> <20130410222233.GB7547@awork2.anarazel.de> <12385.1365633318@sss.pgh.pa.us> <13081.1365635172@sss.pgh.pa.us> <20130410232131.GD7547@awork2.anarazel.de> Comments: In-reply-to Andres Freund message dated "Thu, 11 Apr 2013 01:21:31 +0200" Date: Wed, 10 Apr 2013 19:29:06 -0400 Message-ID: <13612.1365636546@sss.pgh.pa.us> X-Pg-Spam-Score: -4.3 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-general Precedence: bulk Sender: pgsql-general-owner@postgresql.org Andres Freund writes: > On 2013-04-10 19:06:12 -0400, Tom Lane wrote: >> And the answer is they're not testing this code path at all, because if >> you do >> DECLARE c CURSOR WITH HOLD FOR ... >> FETCH ALL FROM c; >> then the second query executes with a portal (and resource owner) >> created to execute the FETCH command, not directly on the held portal. > But in that path CurrentResourceOwner gets reset to portal->resowner as > well (see PortalRunFetch())? Right, but that's the FETCH's portal, which is a regular "live" portal that has a ResOwner. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general