Search Postgresql Archives

Re: out of memory during query execution

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

Thank you for your answer.
The person is charge of building PostGreSQL 8.1.0 has done a 32 bit build and has used the "cc_r" compiler. This person does not succeed to build PostGreSQL 8.1.0 with "gcc" and 64 bits. Unfortunatly, I don't have the errors or the logs of the 64 bits build and I can't tell you what error occurs.

The build done was realized in 32 bits, with the cc_r compiler.
To build POstGreSQL, a rpm was done and the ".spec" file contained the following instructions :
export OBJECT_MODE=32
./configure CC=/usr/vac/bin/cc_r CFLAGS="-O2 -qmaxmem=-1 -qsrcmsg -qlargepage" --enable-thread-safety
--without-readline --prefix=%{buildroot}%{prefix}
gmake -j 4
unset OBJECT_MODE

Do you think that my problems of "out of memory" are due to the 32 bits build ?
Do you think that I must build PostGreSQL wih 64 bits to solve this error ?

Thank you for your help.
Regards,
Alexandra DANTE


Chris Browne a écrit :

ALEXANDRA.DANTE@xxxxxxxx (DANTE ALEXANDRA) writes:
I am a PostGreSQL newbie. I work with the 8.1.0 release on AIX 5.3,
with 300GB of datas.
Some of the queries launched on this database finish with an "*out of
memory*". The queries which have failed contain a lot of join (between
6 tables), sub-select and aggregate. For these queries, the log file
contains :
psql:Q9.sql:40: ERROR:  out of memory
DETAIL:  Failed on request of size 148.

On the server used, I got 3GB of memory and 1 CPU.
The settings specified in the "postgresql.conf" are :
# - Memory -
shared_buffers = 12288                 #temp_buffers = 1000
#max_prepared_transactions = 5       work_mem = 65536
maintenance_work_mem = 262144         max_stack_depth = 24574

Are some of these values false?
Is the "out of memory" error due to smaller memory available ?
Has somenone ever seen this problem ?

We have seen this problem...

It's *probably* related to the memory model you're using.

I have thus far evaded *fully* understanding the details (and hope
that can persist!), but here are some of the things to consider:

- By default, AIX really prefers to build 32 bit binaries

- The sorta-hacks that IBM put in place on library segmentation (and
this stuff is quite ghastly) mean that any backend will likely have
quite a bit less than 2GB of even theoretically-available memory space.

The problem is probably that the memory model is throttling you to
*WAY* less than 2GB of memory.

You may want to try a 64 bit build.  With GCC, this requires something
like the following ./configure incantation...

 CC="gcc -maix64" LDFLAGS="-Wl,-bbigtoc" ./configure



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux