Re: constraint_exclusion on OLTP tables - Mailing list pgsql-admin

From Tom Lane
Subject Re: constraint_exclusion on OLTP tables
Date
Msg-id 28632.1139842925@sss.pgh.pa.us
Whole thread Raw
In response to constraint_exclusion on OLTP tables  (Chris Hoover <revoohc@gmail.com>)
List pgsql-admin
Chris Hoover <revoohc@gmail.com> 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

pgsql-admin by date:

Previous
From: Chris Hoover
Date:
Subject: constraint_exclusion on OLTP tables
Next
From: Chris Browne
Date:
Subject: Re: How to VACUUM this table? "998994633 estimated total rows"