X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 4E82552D8A for ; Sat, 26 Mar 2005 11:42:45 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 20307-09 for ; Sat, 26 Mar 2005 11:42:36 +0000 (GMT) Received: from unisoft.unisoftbg.com (unisoft.unisoftbg.com [194.12.229.193]) by svr1.postgresql.org (Postfix) with SMTP id CDAEE538FA for ; Sat, 26 Mar 2005 11:42:34 +0000 (GMT) Received: (qmail 79672 invoked by uid 1011); 26 Mar 2005 11:49:53 -0000 Received: from pginfo@t1.unisoftbg.com by unisoft.unisoftbg.com by uid 1009 with qmail-scanner-1.22-st-qms (clamdscan: 0.75. spamassassin: 2.60. Clear:RC:0(192.168.1.201):SA:0(-4.8/5.0):. Processed in 19.603414 secs); 26 Mar 2005 11:49:53 -0000 X-Antivirus-MYDOMAIN-Mail-From: pginfo@t1.unisoftbg.com via unisoft.unisoftbg.com X-Antivirus-MYDOMAIN: 1.22-st-qms (Clear:RC:0(192.168.1.201):SA:0(-4.8/5.0):. Processed in 19.603414 secs Process 79661) Received: from unknown (HELO t1.unisoftbg.com) (pginfo@t1.unisoftbg.com@192.168.1.201) by unisoft.unisoftbg.com with SMTP; 26 Mar 2005 11:49:32 -0000 Message-ID: <42453E32.7060206@t1.unisoftbg.com> Date: Sat, 26 Mar 2005 11:49:22 +0100 From: pginfo User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 X-Accept-Language: en-us, en MIME-Version: 1.0 To: pginfo Cc: pgsql-admin@postgresql.org Subject: Re: out of memory error References: <4244DFFB.6090101@t1.unisoftbg.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.999 tagged_above=0 required=5 tests=AWL, RCVD_IN_XBL X-Spam-Level: * X-Archive-Number: 200503/425 X-Sequence-Number: 16923 Hi, I send some additional info : pginfo wrote:sklad05=# explain analyze select S.IDS_NUM,S.IDS_SKLAD,SUM(S.KOL),S.sernum FROM A_GAR_PROD_R S where ids < 9742465 GROUP BY S.IDS_NUM,S.IDS_SKLAD ,s.sernum limit 10; QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------- Limit (cost=82281.59..82281.61 rows=10 width=148) (actual time=9373.301..9373.368 rows=10 loops=1) -> HashAggregate (cost=82281.59..82594.48 rows=125156 width=148) (actual time=9373.294..9373.328 rows=10 loops=1) -> Index Scan using a_gar_prod_r_pkey on a_gar_prod_r s (cost=0.00..69766.02 rows=1251557 width=148) (actual time=16.412..4175.948 rows=1237554 loops=1) Index Cond: (ids < 9742465) Total runtime: 9386.082 ms (5 rows) sklad05=# explain analyze select S.IDS_NUM,S.IDS_SKLAD,SUM(S.KOL),S.sernum FROM A_GAR_PROD_R S where ids < 9742466 GROUP BY S.IDS_NUM,S.IDS_SKLAD ,s.sernum limit 10; ERROR: out of memory DETAIL: Failed on request of size 344. sklad05=# explain analyze select S.IDS_NUM,S.IDS_SKLAD,SUM(S.KOL),S.sernum FROM A_GAR_PROD_R S where ids >= 9742466 GROUP BY S.IDS_NUM,S.IDS_SKLAD ,s.sernum limit 10; QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------------- Limit (cost=7747.82..7747.84 rows=10 width=148) (actual time=960.984..961.050 rows=10 loops=1) -> HashAggregate (cost=7747.82..7777.27 rows=11783 width=148) (actual time=960.979..961.011 rows=10 loops=1) -> Index Scan using a_gar_prod_r_pkey on a_gar_prod_r s (cost=0.00..6569.60 rows=117822 width=148) (actual time=0.874..431.357 rows=131824 loops=1) Index Cond: (ids >= 9742466) Total runtime: 961.283 ms (5 rows) regards, ivan. > Hi , > I try to make insert into myTable select .... on pg 8.0.1 and freeBSD > 5.3. > After ~10 sec. pg returns "out of memory". > > In log file I found: > > Portal hash: 8192 total in 1 blocks; 2008 free (0 chunks); 6184 used > Relcache by OID: 8192 total in 1 blocks; 4040 free (0 chunks); 4152 used > Relcache by name: 24576 total in 2 blocks; 13240 free (5 chunks); > 11336 used > LockTable (locallock hash): 8192 total in 1 blocks; 4056 free (0 > chunks); 4136 u > sed > ErrorContext: 8192 total in 1 blocks; 8176 free (0 chunks); 16 used > ERROR: out of memory > DETAIL: Failed on request of size 340. > > I have 2Gb RAM on this box. > > regards, > ivan. > > > ---------------------------(end of broadcast)--------------------------- > TIP 6: Have you searched our list archives? > > http://archives.postgresql.org > >