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 true, enabled boolean DEFAULT on, analytics_offload_period interval DEFAULT NULL, drop_after_retention_period boolean DEFAULT true );
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_incrementapart 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_partitionspartitions.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— Interval until older partitions are dropped, if defined. This value must be greater thanmigrate_after_period.managed_locally— Whether partitions are managed locally. Setting this tofalseis not recommended.enabled