Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id D2B0E9FBAC4 for ; Mon, 14 May 2007 10:41:59 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 25912-02 for ; Mon, 14 May 2007 10:41:41 -0300 (ADT) X-Greylist: delayed 00:28:00.810131 by SQLgrey-1.7.4 Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 5E3E79FBAD4 for ; Mon, 14 May 2007 10:41:46 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from mail2.sun.ac.za (mail2.sun.ac.za [146.232.64.14]) by svr4.postgresql.org (Postfix) with ESMTP id 2141B5AF02D for ; Mon, 14 May 2007 13:13:33 +0000 (GMT) Received: from burger.sun.ac.za ([146.232.128.30]) by mail2.sun.ac.za with esmtp (Exim 4.50) id 1HnaMY-0005aR-Mo for pgsql-admin@postgresql.org; Mon, 14 May 2007 15:13:18 +0200 Received: from js by burger.sun.ac.za with local (Exim 4.63) (envelope-from ) id 1HnaMY-00071b-Jt for pgsql-admin@postgresql.org; Mon, 14 May 2007 15:13:18 +0200 Date: Mon, 14 May 2007 15:13:18 +0200 From: Johann Spies To: pgsql-admin@postgresql.org Subject: ERROR: invalid memory alloc request size Message-ID: <20070514131318.GA26537@sun.ac.za> Mail-Followup-To: Johann Spies , pgsql-admin@postgresql.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=3.456 tagged_above=0 required=5 tests=AWL=-3.454, BAYES_40=-0.185, URIBL_JP_SURBL=4.087, URIBL_OB_SURBL=3.008 X-Spam-Level: *** X-Archive-Number: 200705/111 X-Sequence-Number: 25431 I am using postgresql 8.1 on Debian Stable. I am trying to build a database on a logserver to enable me to query firewall en squid-logs more efficiently. I am working with large amounts of data. I have so far successfully populated 4 tables with data from one month's firewall logs. One of them is fw_accepted: firewall=> select count(*) from fw_accepted; count ----------- 422790881 (1 row) firewall=> \d fw_accepted; Table "public.fw_accepted" Column | Type | Modifiers ------------+------------------------+----------- num | bigint | not null date | date | not null time | time without time zone | not null start_date | date | start_time | time without time zone | elapsed | interval | bytes | bigint | src | inet | dst | inet | proto | character varying | service | bigint | rule | smallint | fw_user | character varying | Indexes: "bestemming" btree (dst, date, "time") "bron" btree (src, date, "time") "fw_tyd" btree (date) "gebruiker" btree (fw_user, date, "time") "nommer" btree (num, date, "time") I did that by using the dropping the indexes, copying the data from a csv-file and recreating the indexes again. While trying to do the same on the squidlogs-table the following happens: $ psql -d firewall -f laai_squid_logs SET DROP INDEX DROP INDEX psql:laai_squid_logs:4: ERROR: invalid memory alloc request size 1350958157 CONTEXT: COPY squidlogs, line 238780099 CREATE INDEX CREATE INDEX $ cat laai_squid_logs SET client_encoding = 'LATIN1'; DROP INDEX squidbron; DROP INDEX squidtyd ; \copy squidlogs from '/home/log/proxy/nasql/accesspg.csv' using delimiters ' ' csv quote as '"' CREATE INDEX squidbron ON squidlogs USING btree (bron, datum, tyd); CREATE INDEX squidtyd ON squidlogs USING btree (datum, tyd); The particular line in the csv-file looks like this (but I doubt whether it's contents is the cause of the problem): "2007-04-21" "14:48:48" "192.168.0.100" "134" "http://sharefsn.com/quicksilver\">" The table definition: Table "public.squidlogs" Column | Type | Modifiers --------+------------------------+----------- datum | date | not null tyd | time without time zone | not null bron | inet | not null bytes | bigint | url | character varying | Indexes: "squidbron" btree (bron, datum, tyd) "squidtyd" btree (datum, tyd) The server is an old HP LP 2000 with 1G of RAM. Maybe that is the problem, but then, how could I copy the data into the other 4 tables without similar problems? Any idea on how to solve this? Regards Johann -- Johann Spies Telefoon: 021-808 4036 Informasietegnologie, Universiteit van Stellenbosch "Yea, though I walk through the valley of the shadow of death, I will fear no evil, for thou art with me; thy rod and thy staff they comfort me." Psalms 23:4