Re: Space management for PGresult - Mailing list pgsql-patches

From Tom Lane
Subject Re: Space management for PGresult
Date
Msg-id 13493.1132844124@sss.pgh.pa.us
Whole thread Raw
In response to Re: Space management for PGresult  (Atsushi Ogawa <atsushi.ogawa@gmail.com>)
List pgsql-patches
Atsushi Ogawa <atsushi.ogawa@gmail.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

pgsql-patches by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: [PATCH] Formatting patch for psql
Next
From: Simon Riggs
Date:
Subject: Re: Space management for PGresult