Re: Bug #514: Backend crashes periodically

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Warren Volz <wrv(at)po(dot)cwru(dot)edu>
Cc: Barry Lind <barry(at)xythos(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: Bug #514: Backend crashes periodically
Date: 2001-11-12 17:23:30
Message-ID: 15708.1005585810@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

I believe I have found and fixed the crash-in-EvalPlanQual problem you
two reported. The patch for current sources is attached --- it should
work in 7.1.* too, although line numbers might be off a bit.

regards, tom lane

*** src/backend/executor/nodeIndexscan.c.orig Mon Oct 29 15:30:53 2001
--- src/backend/executor/nodeIndexscan.c Mon Nov 12 12:18:06 2001
***************
*** 339,348 ****
{
/*
* If we are being passed an outer tuple, save it for runtime key
! * calc
*/
if (exprCtxt != NULL)
econtext->ecxt_outertuple = exprCtxt->ecxt_outertuple;

/*
* Reset the runtime-key context so we don't leak memory as each
--- 339,355 ----
{
/*
* If we are being passed an outer tuple, save it for runtime key
! * calc. We also need to link it into the "regular" per-tuple
! * econtext, so it can be used during indexqualorig evaluations.
*/
if (exprCtxt != NULL)
+ {
+ ExprContext *stdecontext;
+
econtext->ecxt_outertuple = exprCtxt->ecxt_outertuple;
+ stdecontext = node->scan.scanstate->cstate.cs_ExprContext;
+ stdecontext->ecxt_outertuple = exprCtxt->ecxt_outertuple;
+ }

/*
* Reset the runtime-key context so we don't leak memory as each

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Doran L. Barton 2001-11-12 19:06:56 7.1.3 w/ Perl/DBI application hangs
Previous Message Tom Lane 2001-11-12 05:58:51 Re: Bug #514: Backend crashes periodically