Memory leak while creating indices?

Lists: pgsql-hackers
From: "Maurice Gittens" <mgittens(at)gits(dot)nl>
To: <hackers(at)postgreSQL(dot)org>
Subject: Memory leak while creating indices?
Date: 1998-04-01 15:01:41
Message-ID: [email protected]
Views: Whole Thread | Raw Message | Download mbox | Resend email
Lists: pgsql-hackers

Hi,

Sorry to bring bad news but it seems that the postgresql daemon is leaking
memory when building indices.
(When using electric fence it takes long enough to notice -:))

Anybody want to recommend a good freeware tool which helps to find memory
leaks?

Thanks with regards from Maurice.


From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: mgittens(at)gits(dot)nl (Maurice Gittens)
Cc: hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Memory leak while creating indices?
Date: 1998-04-01 16:10:26
Message-ID: [email protected]
Views: Whole Thread | Raw Message | Download mbox | Resend email
Lists: pgsql-hackers

>
> Hi,
>
> Sorry to bring bad news but it seems that the postgresql daemon is leaking
> memory when building indices.
> (When using electric fence it takes long enough to notice -:))
>
> Anybody want to recommend a good freeware tool which helps to find memory
> leaks?

Yea, as I reported earlier, it is probably all from the same place. I
used a pginterface C file do show it. I think we need Purify.

---------------------------------------------------------------------------

/*
* pgnulltest.c
*
*/

#include <stdio.h>
#include <signal.h>
#include <time.h>
#include <halt.h>
#include <postgres.h>
#include <libpq-fe.h>
#include <pginterface.h>

int main(int argc, char **argv)
{
char query[4000];

if (argc != 2)
halt("Usage: %s database\n",argv[0]);

connectdb(argv[1],NULL,NULL,NULL,NULL);

while (1)
{
sprintf(query,"select * from test;");
doquery(query);
sprintf(query,"update test set x=3;");
doquery(query);
}
disconnectdb();
return 0;
}

--
Bruce Momjian | 830 Blythe Avenue
maillist(at)candle(dot)pha(dot)pa(dot)us | Drexel Hill, Pennsylvania 19026
+ If your life is a hard drive, | (610) 353-9879(w)
+ Christ can be your backup. | (610) 853-3000(h)