Databases & Storage

pg_kpart 2.0 adds PostgreSQL 19 support and partition creation restrictions

Key Takeaway

The pg_kpart 2.0 release introduces time-based restrictions on partition creation and enhanced security controls for database administrators.

Summary

The pg_kpart extension has released version 2.0, expanding its utility for PostgreSQL database administrators managing large-scale partitioned tables. This version introduces compatibility with PostgreSQL 19 and adds new mechanisms to prevent performance degradation during high-traffic periods.

Beyond its core function of rejecting queries that lack partition key predicates, the update provides new Grand Unified Configuration (GUC) parameters. These allow administrators to restrict partition creation to specific time windows and prevent non-superuser roles from altering extension settings, enhancing both operational stability and security.

New operational controls in pg_kpart 2.0

  • PostgreSQL 19 Compatibility: The extension has been updated to support the latest major version of the PostgreSQL database engine.
  • Time-based Partition Control: A new GUC, pg_kpart.deny_partition_creation, allows administrators to define comma-separated time windows (HH:MM[:SS]) during which new partitions cannot be created, preventing heavy locking on busy tables.
  • Administrative Security: The pg_kpart.nouser_change GUC provides a mechanism to restrict the modification of extension settings to superuser roles only.
  • Query Guardrails: The extension continues to enforce efficient data access by rejecting queries that attempt to scan all partitions without a usable predicate on the partition key.

Why it matters

For database administrators and DevOps engineers, this release mitigates the risk of accidental full-hierarchy scans and prevents disruptive table locks during peak production hours. It provides a more robust toolset for enforcing strict partitioning policies in large-scale Linux-based database environments.

Original reference: www.postgresql.org →