‹ 首页

infra-postgres

@clickhouse · 收录于 昨天 · 上游提交 2 天前

Sets up and manages Postgres using the clickhousectl CLI — runs a local Docker-backed Postgres for development, and creates and operates managed ClickHouse Cloud Postgres services (connections, TLS, runtime config, read replicas, failover, point-in-time restore). Use when the user wants a Postgres or PostgreSQL database for their application, a local Postgres dev environment, psql access, or a managed/production Postgres in ClickHouse Cloud, or mentions moving a local Postgres to production.

适合你,如果你需要快速启动一个 Postgres 数据库用于开发或生产环境

/ 通过 npx 安装 校验哈希
npx oh-my-skill add clickhouse/agent-skills/infra-postgres
/ 通过 bash 安装
curl -fsSL https://oh-my-skill.com/install.sh | bash -s -- clickhouse/agent-skills/infra-postgres
/ 已经装过?验证本机副本,不用重装
npx oh-my-skill verify clickhouse/agent-skills/infra-postgres
安装目标可用 --agent / --scope 或 --to 明确指定;省略时只会在唯一已存在的 agent 目录上自动选择,零命中或多命中会停止并提示。content_hash 缺失或不一致均拒装。
498GitHub stars
~593最小装载
~2.3K含声明引用
~2.7K文本包总量
索引托管

怎么用

商店整理自技能原文 · 版本 6e5458d · 表述以原文为准
它做什么

通过 clickhousectl CLI 管理 Postgres:在本地用 Docker 运行开发实例,或在 ClickHouse Cloud 上创建托管服务(连接、TLS、配置、只读副本、故障转移、时间点恢复)。

什么时候触发

当用户说“我要用 Postgres 数据库”、“需要一个 Postgres 开发环境”或“把本地 Postgres 搬到生产”等时触发。

装好后可以这样说
会启动 Docker 容器,返回连接信息。
会按需配置并部署云端实例。
会为现有云服务创建副本。
技能原文 SKILL.md作者撰写 · Apache-2.0 · 6e5458d

Postgres with clickhousectl

clickhousectl manages Postgres in two environments:

  • Local — named, Docker-backed Postgres instances on the user's machine, for development.
  • Cloud — managed Postgres services in ClickHouse Cloud (beta), for production: HA, read replicas, point-in-time restore.

This file routes to the right reference. The step-by-step workflows live in ref/local.md and ref/cloud.md — read the one that matches the user's situation before running commands.

Which reference to use

| The user wants to... | Read | |----------------------|------| | Develop or prototype locally, run tests/CI against Postgres, no cloud account needed | [ref/local.md](ref/local.md) | | Go to production, host a managed Postgres, or use ClickHouse Cloud explicitly | [ref/cloud.md](ref/cloud.md) | | Operate an existing cloud service (passwords, TLS, config, replicas, failover, restore) | [ref/cloud.md](ref/cloud.md) | | Develop locally now, ship to production later | Start with [ref/local.md](ref/local.md); it points to [ref/cloud.md](ref/cloud.md) when it's time to go to prod |

If it's genuinely ambiguous (e.g. "set up Postgres for my app"), default to local for development tasks and ask before creating anything in the cloud — cloud services cost money.

Prerequisites (both workflows)

Check that clickhousectl is installed:

which clickhousectl

If not found, install it:

curl -fsSL https://clickhouse.com/cli | sh

This installs to ~/.local/bin/clickhousectl (with a chctl alias). If the command is still not found, suggest export PATH="$HOME/.local/bin:$PATH" or a new terminal.

All commands accept --json for machine-readable output. Exit codes follow gh conventions: 0 success, 1 error, 2 cancelled, 4 auth required.

Related
  • To replicate Postgres data into ClickHouse for analytics, see ClickPipes (clickhousectl cloud clickpipe --help).
  • For ClickHouse itself (local development or ClickHouse Cloud services), use the infra-clickhouse skill.
按 Apache-2.0 许可原样转载,未经改动 · 在 GitHub 查看 →

评论

登录即可评论;带「已验证安装」的,是发布者名下有本店的安装或持有记录。