Why pg_ttl_index?
Everything you need for automatic data expiration in PostgreSQL
Automatic Data Expiration
Set TTL rules once and let the background worker handle everything. No manual queries, no cron jobs - just automatic, reliable cleanup.
High Performance
Batch deletion handles millions of rows efficiently. Auto-created indexes ensure fast cleanup. Advisory locks prevent overlapping runs.
Built-in Monitoring
Track deletion statistics, monitor worker health, and view cleanup history with dedicated SQL views. Production-ready observability out of the box.
ACID Compliant
Per-table error handling ensures one failure doesn't affect others. Safe, transactional cleanup that never compromises data integrity.
Zero Configuration
Smart defaults work for most use cases. Auto-indexing, optimal batch sizes, and intelligent cleanup intervals require no tuning to get started.
Multiple Tables
Configure different expiration times for different tables. Sessions expire in minutes, logs in days, audit trails in months - all managed automatically.
Ready to automate your data cleanup?
Install pg_ttl_index in minutes and never worry about expired data again.
