Re: pg_dump vs malloc

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_dump vs malloc
Date: 2011-06-10 19:07:00
Message-ID: 23566.1307732820@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Magnus Hagander <magnus(at)hagander(dot)net> writes:
> I came across a situation today with a pretty bad crash of pg_dump,
> due to not checking the return code from malloc(). When looking
> through the code, it seems there are a *lot* of places in pg_dump that
> doesn't check the malloc return code.

> But we do have a pg_malloc() function in there - but from what I can
> tell it's only used very sparsely?

> Shouldn't we be using that one more or less everywhere

Yup. Have at it.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-06-10 19:34:23 Re: [v9.2] Start new timeline for PITR
Previous Message Josh Berkus 2011-06-10 18:57:38 Re: [v9.2] Start new timeline for PITR