Re: Space management for PGresult

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Atsushi Ogawa <atsushi(dot)ogawa(at)gmail(dot)com>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, pgsql-patches(at)postgresql(dot)org
Subject: Re: Space management for PGresult
Date: 2005-11-24 14:55:24
Message-ID: 13493.1132844124@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Atsushi Ogawa <atsushi(dot)ogawa(at)gmail(dot)com> writes:
> (1)accounts table (4 columns, 1,000,000 tuples)
> malloc calls allocated(bytes) unused(bytes) execution time
> --------------------------------------------------------------------------
> 8.1.0 80,542 164,950,016 2,946,402 6.80 sec.
> patched 86 161,478,656 177,650 6.73 sec.

This hardly seems credible --- your patch would result in more wasted
memory, not less. It looks to me like the instrumentation you added
assumes that extra space in a malloc block will never be used later,
which of course is not true ...

regards, tom lane

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Simon Riggs 2005-11-24 17:22:00 Re: Space management for PGresult
Previous Message Peter Eisentraut 2005-11-24 14:45:12 Re: [PATCH] Formatting patch for psql