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