pg_kpart is a new PostgreSQL extension (v1.0) that enforces partition key usage by rejecting queries that would scan all partitions of a partitioned table. Without a usable predicate on the partition key, such queries cause full-hierarchy scans that saturate I/O and degrade performance for all connected users. The extension turns a fragile developer convention into a database-enforced guarantee, with features including an audit mode for gradual rollout, blacklist/whitelist scoping to target specific tables, and a dedicated SQLSTATE for application-level error handling. It is open source under the PostgreSQL license and available on GitHub.
Post #2272
22.7K

pg_kpart version 1.0
- ❤ 15
- 👍 2