# pgpartman/pg_partman

Partition management extension for PostgreSQL

Repository: https://github.com/pgpartman/pg_partman
Canonical: https://ross.abutalabs.com/products/pg_partman
Language: PLpgSQL
License: NOASSERTION
License Family: other
Topics: partitioning, plpgsql, pg-partition-manager, background-worker, postgresql, postgresql-extension
Last push: 2026-08-21T20:48:55+00:00

## Health v2 (maintenance only)
Score: 97/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 98, release rhythm 94, longevity 100
- inputs: {"age_days": 5110, "days_push": 12, "days_rel": 42, "gap_med": 15, "n_releases_24m": 12}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2797, forks 316 (observed 2026-08-28T04:07:22.425767+00:00)

## What it is
pg_partman is a PostgreSQL extension that creates and manages time-based and number-based table partition sets using built-in declarative partitioning. It automates partition maintenance such as creating new child tables and dropping old ones via retention policies, including a background worker that runs maintenance without an external scheduler.

## Use cases
- automatically create and drop time-based partitions in postgres
- manage partition retention policies for large tables
- convert an existing table into a partitioned table
- run partition maintenance without cron using a background worker
- set up numeric range partitioning for postgres tables
- migrate legacy trigger-based partitioning to declarative partitioning

## When to choose
- you need automated creation and retirement of postgres table partitions over time
- you want declarative partitioning with retention policies and minimal external scheduling
- you are migrating large existing tables to partitioned layouts in postgres

## When to avoid
- you use a database other than postgresql
- you need trigger-based (pre-10) partitioning methods, which are deprecated
- your tables are small enough that partitioning adds unnecessary complexity

## Facets
- artifact type: library
- maturity: stable
- function: database, scheduling, developer-tools
- domain: databases, developer-tools
- platform: self-hosted
- tags: postgresql-extension, table-partitioning, declarative-partitioning, background-worker, plpgsql, retention-policy, data-engineering, postgresql, linux

## Member repositories
- pgpartman/pg_partman (main) score 97

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:22.425767+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:49:11.894982+00:00, confidence not recorded.
  - readme: https://github.com/pgpartman/pg_partman (fetched 2026-08-28T04:07:22.425767+00:00, sha d2ff366ecb7a)
- Data as of 2026-08-30T08:39:29.467469+00:00.
