migrate-postgres-tables-to-hypertables
Use this skill to migrate identified PostgreSQL tables to Timescale/TimescaleDB hypertables with optimal configuration and validation.\n\n**Trigger when user asks to:**\n- Migrate or convert PostgreSQL tables to hypertables\n- Execute hypertable migration with minimal
Installation
Pick a client and clone the repository into its skills directory.
Installation
About this skill
Use this skill to migrate identified PostgreSQL tables to Timescale/TimescaleDB hypertables with optimal configuration and validation.\n\nTrigger when user asks to:\n- Migrate or convert PostgreSQL tables to hypertables\n- Execute hypertable migration with minimal downtime\n- Plan blue-green migration for large tables\n- Validate hypertable migration success\n- Configure compression after migration\n\nPrerequisites: Tables already identified as candidates (use find-hypertable-candidates first if needed)\n\nKeywords: migrate to hypertable, convert table, Timescale, TimescaleDB, blue-green migration, in-place conversion, create_hypertable, migration validation, compression setup\n\nStep-by-step migration planning including: partition column selection, chunk interval calculation, PK/constraint handling, migration execution (in-place vs blue-green), and performance validation queries.
How to use
Upewnij się, że masz już zidentyfikowane tabele kandydujące do konwersji na hypertabele. Jeśli nie, użyj najpierw skilla find-hypertable-candidates, aby znaleźć odpowiednie tabele w Twojej bazie PostgreSQL.
Uruchom skill migrate-postgres-tables-to-hypertables i podaj nazwę tabeli, którą chcesz migrować. Skill przeanalizuje strukturę tabeli i zaproponuje optymalną kolumnę do partycjonowania (zazwyczaj timestamp, timestamptz, date lub sekwencyjny integer).
Przejrzyj rekomendacje dotyczące interwału chunków i obsługi kluczy głównych oraz ograniczeń. Skill wygeneruje plan migracji dostosowany do rozmiaru i charakteru Twoich danych.
Wybierz strategię migracji: konwersję in-place dla mniejszych tabel lub migrację blue-green dla dużych tabel, aby zminimalizować czas przestoju. Skill dostarczy gotowe komendy SQL do wykonania wybranej strategii.
Wykonaj wygenerowane zapytania SQL w Twojej bazie danych. Skill utworzy hypertabelę z optymalną konfiguracją i automatycznie skonfiguruje kompresję danych.
Uruchom zapytania walidacyjne wydajności dostarczone przez skill, aby potwierdzić sukces migracji i sprawdzić poprawę wydajności zapytań na nowej hypertabeli.