Mike,
> Is it practical to partition on the status column and, eg, use triggers to
> move a row between the two partitions when status is updated? Any
> surprises to watch for, given the status column is actually NULL for active
> data and contains a value when archived?
When I've done this before, I've had a setup like the following:
1. One "active" partition
2. Multiple "archive" partitions, also partitioned by time (month or year)
3. stored procedure for archiving a record or records.
I'd recommend against triggers because they'll be extremely inefficient
if you need to archive a large number of rows at once.
Also, (2) only really works if you're going to obsolesce (remove)
archive records after a certain period of time. Otherwise the
sub-partitioning hurts performance.
--
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com