Sorry, I forgot attaching patch. But I have send path in another thread. Please see this thread "Patch: Optimize memory allocation in function 'bringetbitmap' ".
Please don't submit a patch on a separate thread. Thanks.
Let's close this thread, so we have just one.
--
Simon Riggs http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services