技能 2026-09-29 00:09 UTC
agent-skillsv0.1.0
版本【0.1.0】由提交人 iskakaushik 提交,主要更新类型为:功能特性新增与扩展。提交说明:infra-postgres: add Postgres-to-Postgres migration guide (pg_dump/pg_restore) (#49)。为项目引入了新的能力与模块支持。
Commit提交信息原文
infra-postgres: add Postgres-to-Postgres migration guide (pg_dump/pg_restore) (#49) ## Summary ClickPipes (`clickhousectl cloud clickpipe create postgres`) replicates Postgres into a **ClickHouse** service; it cannot target a ClickHouse Cloud Postgres service. The `infra-postgres` skill had no migration path, and its only related pointer was to ClickPipes, so agents asked to "migrate my Neon/Supabase/RDS database to ClickHouse Postgres" had nothing correct to follow. - **New `ref/migrate.md`**: migrate an existing Postgres (Neon, Supabase, RDS, Aurora, Cloud SQL, self-hosted) into ClickHouse Cloud Postgres with `pg_dump`/`pg_restore`: inspect source → create target (same-or-newer major) → client version check → dump (`--format directory --jobs --no-owner --no-privileges`, excluding provider-managed schemas/extensions) → create DB + restore + `ANALYZE` → exact row-count validation → cut over. - **`SKILL.md`**: routes migration requests to `ref/migrate.md`, adds migration triggers to the description, and clarifies that ClickPipes cannot target a Postgres service. - Version bump 0.1.0 → 0.2.0 (`SKILL.md` + `metadata.json`), READMEs updated. ## Verification Ran the guide end to end with clickhousectl v0.4.2, pg_dump/pg_restore 17.6: - Source: Neon, Postgres 17.11, us-east-1. 4 tables (50k / 2k / 250k / 750k rows), FKs, 9 indexes, a view, identity sequences, plus Neon Auth's `neon_auth` schema. - Target: `clickhousectl cloud postgres create --region us-east-1 --size c6gd.large --pg-version 17` (running after ~290s). - Dump 7s, restore 7s, 0 restore errors. The validation query's row counts were identical for every `public` table; index/view/sequence counts, `orders_id_seq` last value and an aggregate over the view matched. Findings from the run that are now in the guide: - The connection string returned by `create` connects as `postgres` to the `postgres` database (`sslmode=require`). Because the username is also `postgres`, naive `/postgres` → `/<db>` substitution corrupts the URL, so the guide swaps only the path segment after the port. - Neon projects with Neon Auth have a `neon_auth` schema that should be excluded (`--exclude-schema neon_auth`).