On Wed, May 03, 2006 at 02:52:57PM -0400, Sven Willenberger wrote: > Using identical data and identical queries, why would the amd64 system > using postgresql 8.1.3 be using some 2/3s more memory to store the query > results before output than the i386 system using postgresql 8.0.4? Is the amd64 system running 64-bit code? If so, the all the pointers would double in size. That together with additional alignment requirements could explain it. > These are the final stages after the file has flushed (this was run on > the prior month's data which had fewer results). This would either point > to an issue with a) amd64 memory allocation or b) palloc interacting > with 64bit memory or c) some other change. psql doesn't use palloc. palloc exists purely in the backend. > For now I will try the cursor technique; I assume that if this is run > from within a function returning setof xxxx that I will run into the > same issue? The memory usage is purely the client trying to store the entire dataset in memory. If your function is using the output but not storing, there is ofcourse no problem. Have a nice day, -- Martijn van Oosterhout <kleptog@xxxxxxxxx> http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to litigate.
Attachment:
signature.asc
Description: Digital signature