governing-data-lifecycle

Design PostgreSQL table partitioning, archival, and retention policies.

Updated Mar 6, 2026
One-click install
npx skills add https://github.com/musher-dev/bundles --skill governing-data-lifecycle
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: governing-data-lifecycle
Source: https://github.com/musher-dev/bundles/tree/main/database-schema-governance/skills/governing-data-lifecycle
Command: npx skills add https://github.com/musher-dev/bundles --skill governing-data-lifecycle

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the challenge of uncontrolled data growth in databases by providing strategies for partitioning, archiving, and retention, ensuring performance and manageability.

Core Features & Use Cases

  • Table Partitioning: Implement strategies like Range, List, and Hash partitioning for efficient data management.
  • Data Archival & Retention: Define policies for moving old data to archive storage and purging it after retention periods.
  • Use Case: Design a PostgreSQL table to automatically partition data by month, archive data older than two years, and purge it after five years to maintain optimal performance and comply with data policies.

Quick Start

Use the governing-data-lifecycle skill to design a range-partitioned table for time-series data with a one-year retention policy.

Frequently Asked Questions about governing-data-lifecycle

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I design a PostgreSQL table partitioning strategy for time-series data?

Table partitioning in PostgreSQL manages data growth by dividing tables into smaller physical units. This Skill designs range, list, and hash partition schemes to ensure efficient data management and query performance for time-series workloads.

What is the best way to implement a data retention policy in PostgreSQL?

A data retention policy in PostgreSQL defines rules for archiving and purging old records. This Skill helps you define policies to move data to archive storage and automatically purge it after specified retention periods to maintain compliance.

How does WAL impact partition management and data archival in PostgreSQL?

WAL impact in PostgreSQL affects partition management and archival by generating write-ahead logs during data migration. This Skill compares WAL impacts across different archival patterns to help you minimize overhead during lifecycle transitions.

Can I use materialized view refresh and soft delete lifecycle progression together?

Yes, materialized view refresh and soft delete lifecycle progression can be used together. This Skill governs both mechanisms, allowing you to maintain aggregated views while tracking logical deletion states across your database architecture.

When do I need to archive data instead of purging it directly in PostgreSQL?

You need to archive data in PostgreSQL when historical records must be retained for compliance or analysis before final deletion. This Skill provides archival patterns to safely move old data to separate storage, distinct from immediate purging.

Does PostgreSQL range partitioning work for automatic monthly data archival?

Yes, PostgreSQL range partitioning works effectively for automatic monthly data archival. This Skill helps you design range-partitioned tables that facilitate seamless data movement to archive storage based on time intervals.