Autopartition v5.6
Autopartition allows you to split tables into several partitions. For more information, see Scaling.
bdr.autopartition
The bdr.autopartition
function configures automatic RANGE partitioning of a table.
Synopsis
bdr.autopartition(relation regclass, partition_increment text, partition_initial_lowerbound text DEFAULT NULL, partition_autocreate_expression text DEFAULT NULL, minimum_advance_partitions integer DEFAULT 2, maximum_advance_partitions integer DEFAULT 5, data_retention_period interval DEFAULT NULL, managed_locally boolean DEFAULT false, enabled boolean DEFAULT on);
Parameters
relation
— Name or Oid of a table.partition_increment
— Interval or increment to next partition creation.partition_initial_lowerbound
— If the table has no partition, then the first partition with this lower bound andpartition_increment
apart upper bound is created.partition_autocreate_expression
— The expression used to detect if it's time to create new partitions.minimum_advance_partitions
— The system attempts to always have at leastminimum_advance_partitions
partitions.maximum_advance_partitions
— Number of partitions to create in a single go after the number of advance partitions falls belowminimum_advance_partitions
.data_retention_period