migrate-postgres-tables-to-hypertables
Use this skill to migrate identified PostgreSQL tables to Timescale/TimescaleDB hypertables with optimal configuration and validation. **Trigger when user asks to:** - Migrate or convert PostgreSQL tables to hypertables - Execute hypertable migration with minimal downtime - Plan blue-green migration for large tables - Validate hypertable migration success - Configure compression after migration **Prerequisites:** Tables already identified as candidates (use find-hypertable-candidates first if needed) **Keywords:** migrate to hypertable, convert table, Timescale, TimescaleDB, blue-green migrati
npx skills add timescale/pg-aiguide --skill migrate-postgres-tables-to-hypertables --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# PostgreSQL to TimescaleDB Hypertable Migration Migrate identified PostgreSQL tables to TimescaleDB hypertables with optimal configuration, migration planning and validation. **Prerequisites**: Tables already identified as hypertable candidates (use companion "find-hypertable-candidates" skill if needed). ## Step 1: Optimal Configuration ### Partition Column Selection ```sql -- Find potential partition columns SELECT column_name, data_type, is_nullable FROM information_schema.columns WHERE table_name = 'your_table_name' AND data_type IN ('timestamp', 'timestamptz', 'bigint', 'integer', 'date') ORDER BY ordinal_position; ``` **Requirements:** Time-based (TIMESTAMP/TIMESTAMPTZ/DATE) or sequential integer (INT/BIGINT) Should represent when the event actually occurred or sequential ordering. **Common choices:** - `timestamp`, `created_at`, `event_time` - when event occurred - `id`, `sequence_number` - auto-increment (for sequential data without timestamps) - `ingested_at` - less ideal, only if primary query dimension - `updated_at` - AVOID (records updated out of order, breaks chunk distribution) unless primary query dimension #### Special Case: table with BOTH ID AND Timestamp When t
- Step 1: Optimal Configuration
- Partition Column Selection
- Chunk Interval Selection
- Primary Key/ Unique Constraints Compatibility
- Compression Configuration
- Step 2: Migration Planning
- Pre-Migration Checklist
- Migration Options
- Common Issues
- Step 3: Performance Validation
- Chunk & Compression Analysis
- Query Performance Tests
- Storage Metrics
- Troubleshooting
What does the migrate-postgres-tables-to-hypertables skill do?
Use this skill to migrate identified PostgreSQL tables to Timescale/TimescaleDB hypertables with optimal configuration and validation. **Trigger when user asks to:** - Migrate or convert PostgreSQL tables to hypertables - Execute hypertable migration with minimal downtime - Plan blue-green migration for large tables - Validate hypertable migration success - Configure compression after migration **Prerequisites:** Tables already identified as candidates (use find-hypertable-candidates first if needed) **Keywords:** migrate to hypertable, convert table, Timescale, TimescaleDB, blue-green migrati
How do I install it?
Run `npx skills add timescale/pg-aiguide --skill migrate-postgres-tables-to-hypertables --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From timescale/pg-aiguide, a repository with 1,806 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.