Search Postgresql Archives

Re: Postgres crashed when adding a sequence column

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Richard Huxton <dev@xxxxxxxxxxxx> 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);

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux