infra-postgres
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePostgres with clickhousectl
使用clickhousectl管理Postgres
clickhousectl- 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 and — read the one that matches the user's situation before running commands.
ref/local.mdref/cloud.mdclickhousectl- 本地环境 —— 在用户机器上创建基于Docker的命名Postgres实例,用于开发。
- 云环境 —— ClickHouse Cloud(测试版)中的托管Postgres服务,适用于生产环境:支持高可用(HA)、只读副本、时间点恢复。
本文档会引导你找到对应的参考文档。分步操作流程位于和中——在运行命令前,请阅读与用户场景匹配的文档。
ref/local.mdref/cloud.mdWhich reference to use
选择合适的参考文档
| The user wants to... | Read |
|---|---|
| Develop or prototype locally, run tests/CI against Postgres, no cloud account needed | ref/local.md |
| Go to production, host a managed Postgres, or use ClickHouse Cloud explicitly | ref/cloud.md |
| Operate an existing cloud service (passwords, TLS, config, replicas, failover, restore) | ref/cloud.md |
| Develop locally now, ship to production later | Start with ref/local.md; it points to 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.
| 用户需求 | 阅读文档 |
|---|---|
| 本地开发或原型开发、针对Postgres运行测试/CI、无需云账户 | ref/local.md |
| 部署到生产环境、托管Postgres服务,或明确使用ClickHouse Cloud | ref/cloud.md |
| 操作现有云服务(密码、TLS、配置、副本、故障转移、恢复) | ref/cloud.md |
| 先进行本地开发,后续部署到生产环境 | 从ref/local.md开始;当准备部署到生产环境时,文档会指引你查看ref/cloud.md |
如果需求不明确(例如“为我的应用搭建Postgres”),默认优先选择本地开发方案,并在创建云服务前询问用户——云服务会产生费用。
Prerequisites (both workflows)
前置条件(两种流程通用)
Check that is installed:
clickhousectlbash
which clickhousectlIf not found, install it:
bash
curl -fsSL https://clickhouse.com/cli | shThis installs to (with a alias). If the command is still not found, suggest or a new terminal.
~/.local/bin/clickhousectlchctlexport PATH="$HOME/.local/bin:$PATH"All commands accept for machine-readable output. Exit codes follow conventions: 0 success, 1 error, 2 cancelled, 4 auth required.
--jsongh检查是否已安装:
clickhousectlbash
which clickhousectl如果未找到,请执行以下命令安装:
bash
curl -fsSL https://clickhouse.com/cli | sh安装路径为(带有别名)。如果安装后仍无法找到该命令,建议执行或重启终端。
~/.local/bin/clickhousectlchctlexport PATH="$HOME/.local/bin:$PATH"所有命令均支持参数以输出机器可读格式。退出码遵循约定:0表示成功,1表示错误,2表示取消,4表示需要认证。
--jsonghRelated
相关内容
- 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 skill.
infra-clickhouse
- 如需将Postgres数据复制到ClickHouse进行分析,请查看ClickPipes(执行获取帮助)。
clickhousectl cloud clickpipe --help - 如需使用ClickHouse本身(本地开发或ClickHouse Cloud服务),请使用技能。
infra-clickhouse