Re: [HACKERS] an older problem? hash table out of memory - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: [HACKERS] an older problem? hash table out of memory
Date
Msg-id 199905041721.NAA00646@candle.pha.pa.us
Whole thread Raw
In response to Re: [HACKERS] an older problem? hash table out of memory  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [HACKERS] an older problem? hash table out of memory  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
> Bruce Momjian <maillist@candle.pha.pa.us> writes:
> >> The "hashtable out of memory" problem is reproducible, however.
> >> I'm on it.
> 
> > Historically, no one knows much about the hash routines.
> 
> Well, I've been learning some unpleasant truths :-(.  Hope to have
> some fixes to commit in the next few days.
> 
> The immediate cause of one coredump I saw was that someone who was
> overenthusiastically replacing sprintf's with snprintf's had written
> 
>     snprintf(tempname, strlen(tempname), ...);

Here they are.  Can you properly fix them?  Looks like good news that I
found one of the ones you found.  The others may be OK:

./backend/commands/view.c:    snprintf(buf, strlen(viewName) + 5, "_RET%s", viewName);
./backend/executor/nodeHash.c:    snprintf(tempname, strlen(tempname), "HJ%d.%d", (int) MyProcPid, hjtmpcnt);
./backend/libpq/pqcomm.c:            snprintf(PQerrormsg + strlen(PQerrormsg), ERROR_MSG_LENGTH,


--  Bruce Momjian                        |  http://www.op.net/~candle maillist@candle.pha.pa.us            |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] pg_dump bug (was Re: [SQL] Slow Inserts Again)
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] numeric data type on 6.5