Re: [GENERAL] out of memory during query execution

2005-12-21 Thread Seneca Cunningham
DANTE ALEXANDRA wrote: > Last question, how can I see that my 32-bit AIX program being limited to > 256MB of heap, as the user "pg_810" used to launch the postmaster got > when I execute the "ulimit -a" command : > $ ulimit -a > time(seconds)unlimited > file(blocks) unlimited > data

Re: [GENERAL] out of memory during query execution

2005-12-21 Thread Tom Lane
DANTE ALEXANDRA <[EMAIL PROTECTED]> writes: > In my case, does this mean that each one of the two hashs and sorts will > take 64MB, so 192MB ? > What do you want to say with "so the two hashes and sort would think > they could use 3/4ths of the available heap" ? Right, exactly. In this particul

Re: [GENERAL] out of memory during query execution

2005-12-21 Thread DANTE ALEXANDRA
Hello Tom, I've got others questions on work-mem parameter. On the "http://www.powerpostgresql.com/Downloads/annotated_conf_80.html"; web site, I've read that the work-mem specifies the amount of memory to be used by internal sort operations ans hash tables before switching to temporary disk f

Re: [GENERAL] out of memory during query execution

2005-12-21 Thread DANTE ALEXANDRA
Hello, Just to give you explanation, I will try to explain you why I have set the "work_mem" to 64MB. I noticed that some of the queries have finished with an "out of memory" because the file system on which temporary files were created was to small. Consequently, I have increase the size of

Re: [GENERAL] out of memory during query execution

2005-12-21 Thread Martijn van Oosterhout
On Wed, Dec 21, 2005 at 10:22:05AM +0100, DANTE ALEXANDRA wrote: > Hello, > > Thank you for all the answers I've got on this problem. > > Tom, I've checked this morning if the logfile contains lines like > %s: %ld total in %ld blocks; %ld free (%ld chunks); %ld used > and it is the case. > Exec

Re: [GENERAL] out of memory during query execution

2005-12-21 Thread DANTE ALEXANDRA
Hello, According to several answers, my problem could be due to the 32 bits build. I hope I will try to make a 64 bits build in January, in order to give you more explanations about the possible errors I will encounter. I keep preciously your advice, and I hope I will be able to give you an a

Re: [GENERAL] out of memory during query execution

2005-12-21 Thread DANTE ALEXANDRA
Hello, Thank you for all the answers I've got on this problem. Tom, I've checked this morning if the logfile contains lines like %s: %ld total in %ld blocks; %ld free (%ld chunks); %ld used and it is the case. As I launch a series of queries, I hope that the following lines are the exact lines

Re: [GENERAL] out of memory during query execution

2005-12-20 Thread Tom Lane
Kevin Murphy <[EMAIL PROTECTED]> writes: > I'm certainly not an AIX expert, but I remember my 32-bit AIX programs > being limited to 256MB of heap by default. Hmm ... if that's the case then it'd probably explain the problem. Alexandra had work_mem set to 64MB, so the two hashes and sort would th

Re: [GENERAL] out of memory during query execution

2005-12-20 Thread DANTE ALEXANDRA
Hello, The part table contains 6000 rows, so I think that the 96000 rows estimated matches in part could match reality. Currently, the lineitem table contains only one index : TPCH=# \d lineitem Table "public.lineitem" Column | Type | Modifiers -

Re: [GENERAL] out of memory during query execution

2005-12-20 Thread Kevin Murphy
I'm certainly not an AIX expert, but I remember my 32-bit AIX programs being limited to 256MB of heap by default. When I linked, I think I had to ask for more maximum data page space using something like: -bmaxdata:0x4000 (which asks for 1GB, I believe) -Kevin Murphy --

Re: [GENERAL] out of memory during query execution

2005-12-20 Thread Tom Lane
Martijn van Oosterhout writes: > On Tue, Dec 20, 2005 at 01:35:03PM +0100, DANTE ALEXANDRA wrote: >> You will find below the explain plan of one of the queries which has >> finished with "out of memory". This query contains aggregate and a >> sub-select with 6 joins : > 1. Firstly, it could be th

Re: [GENERAL] out of memory during query execution

2005-12-20 Thread Seneca Cunningham
DANTE ALEXANDRA wrote: > 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 ca

Re: [GENERAL] out of memory during query execution

2005-12-20 Thread Martijn van Oosterhout
On Tue, Dec 20, 2005 at 01:35:03PM +0100, DANTE ALEXANDRA wrote: > You will find below the explain plan of one of the queries which has > finished with "out of memory". This query contains aggregate and a > sub-select with 6 joins : 1. Firstly, it could be the Hash node. Does the estimated numbe

Re: [GENERAL] out of memory during query execution

2005-12-20 Thread DANTE ALEXANDRA
Hello, The postmaster is launched by the user "pg_810" who is not the root user. When I launch the "ulimit -a" command, I've got : $ ulimit -a time(seconds)unlimited file(blocks) unlimited data(kbytes) unlimited stack(kbytes)unlimited memory(kbytes) unlimited

Re: [GENERAL] out of memory during query execution

2005-12-20 Thread DANTE ALEXANDRA
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 an

Re: [GENERAL] out of memory during query execution

2005-12-19 Thread Tom Lane
DANTE ALEXANDRA <[EMAIL PROTECTED]> 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), s

Re: [GENERAL] out of memory during query execution

2005-12-19 Thread Seneca Cunningham
Chris Browne wrote: > 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" ./con

Re: [GENERAL] out of memory during query execution

2005-12-19 Thread Chris Browne
[EMAIL PROTECTED] (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-