Re: Postgres crashed when adding a sequence column - Mailing list pgsql-general

From Tom Lane
Subject Re: Postgres crashed when adding a sequence column
Date
Msg-id 11294.1106535043@sss.pgh.pa.us
Whole thread Raw
In response to Re: Postgres crashed when adding a sequence column  (Richard Huxton <dev@archonet.com>)
List pgsql-general
Richard Huxton <dev@archonet.com> writes:
> Hmm - wonder if there might be some memory leak in updates to the R-tree

Yup, found one.  The attached patch is against 7.4.

            regards, tom lane

Index: rtree.c
===================================================================
RCS file: /cvsroot/pgsql/src/backend/access/rtree/rtree.c,v
retrieving revision 1.80
diff -c -r1.80 rtree.c
*** rtree.c    25 Sep 2003 06:57:57 -0000    1.80
--- rtree.c    24 Jan 2005 02:34:19 -0000
***************
*** 594,599 ****
--- 594,601 ----
      rtup = (IndexTuple) index_formtuple(tupDesc,
                                          &(v.spl_rdatum), isnull);
      pfree(isnull);
+     pfree(DatumGetPointer(v.spl_ldatum));
+     pfree(DatumGetPointer(v.spl_rdatum));

      /* set pointers to new child pages in the internal index tuples */
      ItemPointerSet(&(ltup->t_tid), lbknum, 1);

pgsql-general by date:

Previous
From: Michelle Konzack
Date:
Subject: Re: question on new psql datatype
Next
From: Öܵ½¾©
Date:
Subject: question about "delete performance"