Re: Postgres crashed when adding a sequence column

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Richard Huxton <dev(at)archonet(dot)com>
Cc: Clive Page <cgp(at)star(dot)le(dot)ac(dot)uk>, pgsql-general(at)postgresql(dot)org
Subject: Re: Postgres crashed when adding a sequence column
Date: 2005-01-24 02:50:43
Message-ID: 11294.1106535043@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Richard Huxton <dev(at)archonet(dot)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);

In response to

Browse pgsql-general by date

  From Date Subject
Next Message yourfriend 2005-01-24 04:29:12 question about "delete performance"
Previous Message Michelle Konzack 2005-01-24 00:14:18 Re: question on new psql datatype