pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Joshua Berry <yoberi@gmail.com>
Cc: PostgreSQL - General <pgsql-general@postgresql.org>
Subject: Re: Segmentation fault with core dump
Date: Thu, 11 Apr 2013 01:37:44 +0200
Message-ID: <20130410233744.GF7547@awork2.anarazel.de> (raw)
In-Reply-To: <13612.1365636546@sss.pgh.pa.us>
References: <CAPmZXM03MEDEn6nqqf_Phs3M1DK-EaXP5_K-LmirneOJMAQ-Hg@mail.gmail.com>
	<20130410214929.GA7547@awork2.anarazel.de>
	<CAPmZXM2AV1D1_grC7pwg8WH4L-cTqcDEWOC2VneG2X8OHLxdsw@mail.gmail.com>
	<20130410222233.GB7547@awork2.anarazel.de>
	<12385.1365633318@sss.pgh.pa.us>
	<13081.1365635172@sss.pgh.pa.us>
	<20130410232131.GD7547@awork2.anarazel.de>
	<13612.1365636546@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-general>

On 2013-04-10 19:29:06 -0400, Tom Lane wrote:
> Andres Freund <andres@2ndquadrant.com> 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.

I don't think so?

standard_ProcessUtility:
PerformPortalFetch:
	/* get the portal from the portal name */
	portal = GetPortalByName(stmt->portalname);
        ...
	/* Do it */
	nprocessed = PortalRunFetch(portal,
								stmt->direction,
								stmt->howMany,
								dest);
PortalRunFetch:
	PG_TRY();
	{
		ActivePortal = portal;
		CurrentResourceOwner = portal->resowner;

So it seems to trigger a very similar codepath?

Greetings,

Andres Freund

-- 
 Andres Freund	                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



view thread (32+ messages)  latest in thread

Message-ID: <20130410233744.GF7547@awork2.anarazel.de>
Permalink:  ../20130410233744.GF7547@awork2.anarazel.de/
Also on:    postgresql.org/message-id/20130410233744.GF7547@awork2.anarazel.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: andres@2ndquadrant.com, tgl@sss.pgh.pa.us, yoberi@gmail.com
  Subject: Re: Segmentation fault with core dump
  In-Reply-To: <20130410233744.GF7547@awork2.anarazel.de>
  References: <CAPmZXM03MEDEn6nqqf_Phs3M1DK-EaXP5_K-LmirneOJMAQ-Hg@mail.gmail.com> <20130410214929.GA7547@awork2.anarazel.de> <CAPmZXM2AV1D1_grC7pwg8WH4L-cTqcDEWOC2VneG2X8OHLxdsw@mail.gmail.com> <20130410222233.GB7547@awork2.anarazel.de> <12385.1365633318@sss.pgh.pa.us> <13081.1365635172@sss.pgh.pa.us> <20130410232131.GD7547@awork2.anarazel.de> <13612.1365636546@sss.pgh.pa.us> <20130410233744.GF7547@awork2.anarazel.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox