Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 6A05B633644 for ; Wed, 4 Aug 2010 11:30:08 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 10170-02 for ; Wed, 4 Aug 2010 14:29:59 +0000 (UTC) X-Greylist: delayed 00:07:43.717633 by SQLgrey-1.7.6 Received: from mx.ttitech.net (smtp.ttitech.net [65.202.253.91]) by mail.postgresql.org (Postfix) with ESMTP id 5829B632D98 for ; Wed, 4 Aug 2010 11:29:58 -0300 (ADT) Received: from [172.30.249.253] (ns8 [65.202.253.88]) by mx.ttitech.net (Postfix) with ESMTPSA id 6BDDC68412 for ; Wed, 4 Aug 2010 10:22:11 -0400 (EDT) Message-ID: <4C597794.80300@ttitech.net> Date: Wed, 04 Aug 2010 10:22:12 -0400 From: Joshua Gooding User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.7) Gecko/20100713 Lightning/1.0b2 Thunderbird/3.1.1 MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: Some quick questions Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.011 tagged_above=-5 required=5 tests=BAYES_20=-0.001, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201008/15 X-Sequence-Number: 34455 I am using Postgres 8.4 with 10 partition tables. We'll call them reports_00 through reports_09. I have a field that is a BIGINT which is a 13 digit number that is the epoch time, which is the constraint that the table is partitioned on. (Between time x and y). All of the partitions hold 10 weeks of data. The idea is that I would like to write a script that would truncate and drop the oldest week's table (after 10 weeks), rename the oldest remaining 9 tables, create a new table, with the current and future epoch date in the constraint, and continue on my merry way. Is there anything like this already in postgres? Secondly can it be done without manual intervention? Can I do this in a function and have it auto run at a certain "time" based on epoch? This is something that I have never gotten into so this is new territory for me, so please forgive me if I am asking any newbie questions here. I've tweaked the server that I am testing postgres on. I'm basically doing side by side comparisons with Oracle, trying to see if we can get the same or close to Oracle's performance. I've read the Wiki article on tuning the PostgreSQL server, and I believe that I have gotten it close, but there is still a substantial gap. Say I have a machine with a 4 core processor and 16GB of ram (across 4 sticks), can I tweak the configuration to use all 4 cores and 1GB of ram from each physical stick on the machine? This is running on a Fedora Core - 12 machine. Is that an OS issue or is than a Postgres configuration question? Any advice or guidance would be greatly appreciated. -- Joshua Gooding