Changelog¶
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.1.0 - 2026-05-08¶
First public release of pg-partsmith.
- Time-based partition lifecycle management: create ahead, detach expired, drop orphans.
- Period calculators:
DayPeriodCalculator,WeekPeriodCalculator,MonthPeriodCalculator,YearPeriodCalculatorandBasePeriodCalculatorfor custom strategies. get_period_calculator()— factory function that returns the right calculator for a given granularity.PartitionLifecycleService— orchestrates the full create → detach → drop sequence.PartitionMaintainer— scheduler-friendly wrapper;run_maintenance_safe()never raises.maintain_partitions()— plain async function for APScheduler, Celery Beat, etc.- Lifecycle hooks:
before_create,after_create,before_detach,after_detach,before_drop,after_drop.before_*failures abort the operation;after_*failures are logged as warnings. PostgresPartitionRepository— PostgreSQL DDL implementation.PostgresMetadataProvider— PostgreSQL system catalog queries.PostgresAdvisoryLockManager— session-level advisory locks (no extra dependencies).RedisDistributedLockManager— Redis distributed locks (pg-partsmith[redis-locks]).PartitionTableSettings— pydantic-settings base class for env-driven configuration (pg-partsmith[pydantic-settings]).- Multi-schema support via
schemafield inTablePartitionConfig. - Orphan partition tracking via
COMMENTmarkers on detached tables. - DEFAULT partition reconciliation: moves conflicting rows and retries
ATTACH PARTITION. - TIMESTAMPTZ UTC boundary enforcement (
ddl_timezone="UTC"default). - Safe-drop protection:
UnmanagedPartitionDropErrorguards against dropping unmanaged tables. - All
Protocolclasses are@runtime_checkable— custom implementations can be validated viaisinstance(). - Python 3.11, 3.12, and 3.13 support.