Re: Bug #514: Backend crashes periodically

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Bug #514: Backend crashes periodically
Дата
Msg-id 15708.1005585810@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Bug #514: Backend crashes periodically  (Warren Volz <wrv@po.cwru.edu>)
Ответы Re: Bug #514: Backend crashes periodically
Список 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

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Bug #514: Backend crashes periodically
Следующее
От: "Doran L. Barton"
Дата:
Сообщение: 7.1.3 w/ Perl/DBI application hangs