X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 5FA999DCC4F for ; Mon, 13 Feb 2006 11:02:03 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 34073-02 for ; Mon, 13 Feb 2006 11:02:07 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id F09CD9DCC38 for ; Mon, 13 Feb 2006 11:02:00 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id k1DF25kE028633; Mon, 13 Feb 2006 10:02:05 -0500 (EST) To: Chris Hoover cc: "pgsql-admin@postgresql.org" Subject: Re: constraint_exclusion on OLTP tables In-reply-to: <1d219a6f0602130650l690a255amf4bb68ceab914e3b@mail.gmail.com> References: <1d219a6f0602130650l690a255amf4bb68ceab914e3b@mail.gmail.com> Comments: In-reply-to Chris Hoover message dated "Mon, 13 Feb 2006 09:50:10 -0500" Date: Mon, 13 Feb 2006 10:02:05 -0500 Message-ID: <28632.1139842925@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.109 required=5 tests=[AWL=0.109] X-Spam-Score: 0.109 X-Spam-Level: X-Archive-Number: 200602/159 X-Sequence-Number: 20580 Chris Hoover writes: > The problem I am having is how can you safely move records between > main_table_live and one of the other partition tables? My advice is "don't do that". Partition just based on the year. You can exploit your knowledge about status distribution by creating suitable indexes. > Also, is there a way to make foreign keys work with the partitioned table No, not at present, which is another reason you don't want records moving around. regards, tom lane