pg_part
Table partitioning utility for PostgreSQL
pg_part · Table partitioning utility for PostgreSQL
Overview
| Relationships | |
|---|---|
| Requires | plpgsql |
Usage
Sources:
pg_part provides PL/pgSQL helpers in the fixed pgpart schema for legacy inheritance-based partitioning. It can add, merge, attach, detach, and list child tables.
The add and merge paths build dynamic DDL and use server-side COPY files to move rows. Identifiers, check expressions, and file paths are concatenated into SQL, so restrict execution to trusted administrators and never pass user-controlled text. This predates declarative partitioning; rehearse locking, constraints, indexes, privileges, failure rollback, disk capacity, and cleanup on a copy before touching important data, and prefer core declarative partitioning for new systems.