Re: [HACKERS] min() and max() causing aborts

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: [HACKERS] min() and max() causing aborts
Дата
Msg-id 199903211858.NAA28452@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] min() and max() causing aborts  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [HACKERS] min() and max() causing aborts  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
> Yesterday evening (after you partially backed out that patch) I updated
> and rebuilt and ran regression test.  I didn't see any regress failures
> involving aggregates, and a quick hand smoke-test of max and min looks
> OK:

I am attaching the patch I BACKED HOW, so the user can see if it is in
their tree.  It should not be ther.

--
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
***
/afs/ece.cmu.edu/project/lcs/lcs-004/er1p/postgres/611/src/backend/executor/nodeAgg.c
Thu Mar 11 23:59:11 1999
---
/afs/ece.cmu.edu/project/lcs/lcs-004/er1p/postgres/612/src/backend/executor/nodeAgg.c
Fri Mar 19 15:01:21 1999
***************
*** 110,115 ****
--- 110,116 ----
                  isNull2 = FALSE;
      bool        qual_result;

+     Datum  oldVal = (Datum) NULL;  /* XXX - so that we can save and free on each iteration - er1p */

      /* ---------------------
       *    get state info from node
***************
*** 372,379 ****
--- 373,382 ----
                           */
                          args[0] = value1[aggno];
                          args[1] = newVal;
+                         oldVal = value1[aggno]; /* XXX - save so we can free later - er1p */
                          value1[aggno] =    (Datum) fmgr_c(&aggfns->xfn1,
                                             (FmgrValues *) args, &isNull1);
+                         pfree(oldVal); /* XXX - new, let's free the old datum - er1p */
                          Assert(!isNull1);
                      }
                  }

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] min() and max() causing aborts
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] Unary % operator is broken in current sources