Overview of pg_partman features and requirements
developmentOverview
pg_partman is a PostgreSQL extension designed to simplify managing time-based or number/ID-based table partitioning.
Key Requirements & Compatibility
- PostgreSQL Version: Minimum version 14 is required (as of version 5.0.1).
- Partitioning Method: Uses built-in declarative partitioning. Trigger-based partitioning is no longer supported.
- Partitioning Types:
- Ranged Partitioning: Supported for time- and number-based intervals.
- List Partitioning: Supported for number-based partitioning when the interval is
1. - Numeric/Decimal Support: Experimental support for numeric/decimal values in number-based partitioning is available (as of version 5.1), but the interval must remain an integer.
Data Handling & Default Partitions
- A default partition is automatically created for all partition sets to catch data falling outside existing child boundaries.
- Use
check_default()to monitor data in the default table. - Use the
partition_data_* family of functions to move data from the default table into valid child partitions. - Warning: Future child table creation is based on current partition set data and ignores data in the default table by default. It is recommended to set a high
premakevalue to ensure the expected data range is covered.