A PostgreSQL extension that automates the creation and maintenance of time-based and number-based table partitions.
pg_partman is a PostgreSQL extension that automates the management of partitioned tables. It builds upon PostgreSQL's native declarative partitioning to handle routine maintenance tasks like creating new partitions and dropping old ones based on retention policies, significantly reducing manual administrative overhead for large-scale data management.
Database administrators and developers managing large PostgreSQL databases with partitioned tables, particularly those dealing with time-series or high-volume data requiring automated lifecycle management.
Developers choose pg_partman because it provides built-in automation for partition maintenance, including a background worker that eliminates dependency on external schedulers like cron, and offers robust tools for migrating existing tables to partitioned setups, extending PostgreSQL's native partitioning with production-ready management features.
Partition management extension for PostgreSQL
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Handles the creation of new partitions and deletion of old ones automatically based on configurable retention policies, reducing manual administrative tasks as described in the README.
Includes an integrated process to run maintenance without relying on external schedulers like cron, providing more reliable and self-contained automation.
Offers features to migrate existing tables to partitioned tables and vice versa, easing adoption with minimal downtime, as outlined in the how-to documentation.
Builds upon PostgreSQL's native declarative partitioning, ensuring compatibility and leveraging database optimizations for better performance and maintainability.
Requires editing postgresql.conf to load the background worker via shared_preload_libraries and configuring multiple parameters, which can be error-prone and intimidating for new users.
Upgrading between major versions (e.g., 4.x to 5.x) demands careful review of changelogs and additional steps, potentially causing downtime or configuration issues, as warned in the upgrade documentation.
Only supports PostgreSQL 14 and above, excluding users on older versions and limiting adoption in legacy or constrained environments.