Re: Postgres Out of Memory

From: Kaloyan Iliev Iliev <news1(at)faith(dot)digsys(dot)bg>
To: Eduardo Vбzquez Rodrнguez <evazquez(at)insys-corp(dot)com(dot)mx>, pgsql-novice(at)postgresql(dot)org
Subject: Re: Postgres Out of Memory
Date: 2005-04-11 10:42:00
Message-ID: 425A5478.3060101@faith.digsys.bg
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi,
I think the problem is with "HashAggregate (cost=622577.68..622592.70
rows=2003 width=110)"
Have you done VACUUM ANALYZE soon?
If it still don't work try turnig hash agregate off : SET enable_hashagg
= OFF

I think this will solve your problem. I have the same problem a month or
two ago.

Good Luck

Kaloyan

Eduardo Vбzquez Rodrнguez wrote:

> Hello
>
> When I run the following query, I have the error "Out of memory". I
> believe that is memory problem, but before changing any parameter in
> Postgres configuration files I remember that under
> ~data/pgsql_temp/ Temporary files used to appear when I ran a big
> query each temporary was approximately about 1 gigabyte.
>
> Here is my query
>
> SELECT proceso, id_mail, to_mail, temp
> FROM (
> SELECT proceso, id_mail, to_mail, count (*) AS temp
> FROM SENDMAIL2
> GROUP BY proceso, id_mail, to_mail
> HAVING proceso = 'Automatas'
> ) AS TAB_TEMP
> HAVING temp != 1
>
> The output of Explain is here
>
> QUERY PLAN
> Subquery Scan tab_temp (cost=622577.68..622612.73 rows=2003 width=118)
> -> HashAggregate (cost=622577.68..622592.70 rows=2003 width=110)
> Filter: (count(*) <> 1)
> -> Seq Scan on sendmail2 (cost=0.00..622327.31 rows=20029
> width=110)
> Filter: ((proceso)::text = 'Automatas'::text)
>
>
>
> My /etc/system file is this
> set shmsys:shminfo_shmmax = 1073741824
> set shmsys:shminfo_shmmin = 1
> set shmsys:shminfo_shmmni = 100
> set semsys:seminfo_semmni = 100
> set shmsys:shminfo_shmseg = 10
> set semsys:seminfo_semmsl = 100
> set semsys:seminfo_semmns = 2500
>
> set semsys:seminfo_semopm=10
> set semsys:seminfo_semaem=16384
> set semsys:seminfo_semume=10
> set semsys:seminfo_semmap=1
> set semsys:seminfo_semusz=96
> set semsys:seminfo_semmnu=30
> set semsys:seminfo_semvmx=32767
> forceload: sys/semsys
> forceload: sys/shmsys
>
>
> My postgresql.conf is this
> shared_buffers = 50000
> work_mem = 2097151
> maintenance_work_mem = 2097151
>
>
>
> Please help me!!!
>
> Thanks in advanced
>

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Leena JAIN 2005-04-11 11:49:49 Migration of postgres 7.3 to postgres 7.4 from one server to another server
Previous Message Sean Davis 2005-04-11 10:02:00 Re: Mac Gui