pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Frank van Vugt <ftm.van.vugt@foxi.nl>
Cc: pgsql-bugs@postgresql.org
Subject: Re: bug or simply not enough stack space?
Date: Fri, 17 Jul 2009 12:17:56 -0400
Message-ID: <2759.1247847476@sss.pgh.pa.us> (raw)
In-Reply-To: <200907171110.58371.ftm.van.vugt@foxi.nl>
References: <200907161545.20338.ftm.van.vugt@foxi.nl>
	<200907161630.29119.ftm.van.vugt@foxi.nl>
	<9169.1247755019@sss.pgh.pa.us>
	<200907171110.58371.ftm.van.vugt@foxi.nl>

Frank van Vugt <ftm.van.vugt@foxi.nl> writes:
> So this took a while, but here's your test case.....
> Turns out to be quite small actually ;)

Hmm ... the relevant code change seems to have been
http://archives.postgresql.org/pgsql-committers/2009-04/msg00127.php

I think I might have been overenthusiastic in trying to free resources
during a subtransaction abort.  Try this patch and see if you notice
any bad side-effects.

			regards, tom lane
inline patch 1: src/pl/plpgsql/src/pl_exec.c (+2/-1 lines) download inline-1.patchIndex: src/pl/plpgsql/src/pl_exec.c =================================================================== RCS file: /cvsroot/pgsql/src/pl/plpgsql/src/pl_exec.c,v retrieving revision 1.244 diff -c -r1.244 pl_exec.c *** src/pl/plpgsql/src/pl_exec.c 17 Jun 2009 13:46:12 -0000 1.244 --- src/pl/plpgsql/src/pl_exec.c 17 Jul 2009 16:12:22 -0000 *************** *** 5292,5298 **** { SimpleEcontextStackEntry *next; ! FreeExprContext(simple_econtext_stack->stack_econtext); next = simple_econtext_stack->next; pfree(simple_econtext_stack); simple_econtext_stack = next; --- 5292,5299 ---- { SimpleEcontextStackEntry *next; ! if (event == SUBXACT_EVENT_COMMIT_SUB) ! FreeExprContext(simple_econtext_stack->stack_econtext); next = simple_econtext_stack->next; pfree(simple_econtext_stack); simple_econtext_stack = next;

view thread (12+ messages)  latest in thread

Message-ID: <2759.1247847476@sss.pgh.pa.us>
Permalink:  ../2759.1247847476@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2759.1247847476@sss.pgh.pa.us

 ·  · 

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-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, ftm.van.vugt@foxi.nl
  Subject: Re: bug or simply not enough stack space?
  In-Reply-To: <2759.1247847476@sss.pgh.pa.us>
  References: <200907161545.20338.ftm.van.vugt@foxi.nl> <200907161630.29119.ftm.van.vugt@foxi.nl> <9169.1247755019@sss.pgh.pa.us> <200907171110.58371.ftm.van.vugt@foxi.nl> <2759.1247847476@sss.pgh.pa.us>

* 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