Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
keithf4 committed Sep 9, 2012
1 parent e46378b commit 4469730
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions doc/pg_partmaint.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ PostgreSQL Partition Maintenance Extension (pg_partmaint)
* Second paramter (p_control) is the column that the partitioning will be based on. Must be a time based column (integer support for ID partitioning coming soon).
* Third column (p_type) is one of 4 values to set the partitioning type that will be used (time-static is the only one currently supported)

> time-static: Trigger function inserts only into specifically named partitions (handles data for current partition, 2 partitions ahead and 1 behind). Cannot handle inserts to parent table outside the hard-coded time window. Function is kept up to date by run_maintenance() function. Ideal for high TPS tables that get inserts of new data only.
> time-dynamic: Trigger function can insert into any child partition based on the value of the control column. More flexible but not as efficient as time-static.
> id-static: Same functionality as time-static but for a numeric range instead of time.
> id-dynamic: Same functionality as time-dynamic but for a numeric range instead of time.
time-static: Trigger function inserts only into specifically named partitions (handles data for current partition, 2 partitions ahead and 1 behind). Cannot handle inserts to parent table outside the hard-coded time window. Function is kept up to date by run_maintenance() function. Ideal for high TPS tables that get inserts of new data only.
time-dynamic: Trigger function can insert into any child partition based on the value of the control column. More flexible but not as efficient as time-static.
id-static: Same functionality as time-static but for a numeric range instead of time.
id-dynamic: Same functionality as time-dynamic but for a numeric range instead of time.

* Fourth parameter (p_interval) is the time or numeric range interval for each partition. Supported values are:

> yearly - One partition per year
> monthly - One partition per month
> weekly - One partition per week. Follows ISO week date format (http://en.wikipedia.org/wiki/ISO_week_date). Partitions are named as YYYYwWW (ex: 2012w36).
> daily - One partition per day
> hourly - One partition per hour
> half-hour - One partition per 30 minute interval on the half-hour (1200, 1230)
> quarter-hour - One partition per 15 minute interval on the quarter-hour (1200, 1215, 1230, 1245)
> id - For ID based partitions, the range of that ID that should be set per partition (not yet supported)
yearly - One partition per year
monthly - One partition per month
weekly - One partition per week. Follows ISO week date format (http://en.wikipedia.org/wiki/ISO_week_date). Partitions are named as YYYYwWW (ex: 2012w36).
daily - One partition per day
hourly - One partition per hour
half-hour - One partition per 30 minute interval on the half-hour (1200, 1230)
quarter-hour - One partition per 15 minute interval on the quarter-hour (1200, 1215, 1230, 1245)
id - For ID based partitions, the range of that ID that should be set per partition (not yet supported)

* Fifth paramter (p_premake) is how many additional partitions to stay ahead of the current partition. Default value is 3. This will keep at minimum 4 partitions made, including the current one. For example, if today was Sept 6, 2012, and premake was set to 4 for a daily partition, then partitions would be made for the 6th as well as the 7th, 8th, 9th and 10th.
* Sixth parameter (p_debug) is to turn on additional debugging information (not yet working).
Expand Down

0 comments on commit 4469730

Please sign in to comment.