infra-postgres

Sets up and manages local Docker-backed and ClickHouse Cloud Postgres services via clickhousectl.

525|36|Updated Jan 15, 2026
One-click install
npx skills add https://github.com/ClickHouse/agent-skills --skill infra-postgres
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: infra-postgres
Source: https://github.com/ClickHouse/agent-skills/tree/main/skills/infra-postgres
Command: npx skills add https://github.com/ClickHouse/agent-skills --skill infra-postgres

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Provisioning and operating Postgres for development and production involves many manual steps—installing servers, managing ports and passwords, configuring TLS, and handling replicas or restores. This Skill gives an AI agent the exact clickhousectl workflows to run local Docker-backed Postgres instances and managed ClickHouse Cloud Postgres services without guesswork.

Core Features & Use Cases

  • Local Development Instances: Start named, Docker-backed Postgres instances with auto-assigned ports and generated passwords, run SQL via a psql wrapper, and wire connection variables into .env files.
  • Managed Cloud Postgres: Authenticate with API keys, create ClickHouse Cloud Postgres services with chosen region, size, HA mode, and Postgres version, then connect securely with TLS CA bundles.
  • Day-2 Operations: Handle password resets, runtime config patches, read replicas, failover and switchover, point-in-time restore, restarts, and deletions with appropriate safety confirmations.
  • Use Case: A developer asks the agent to set up Postgres for a new app; the agent starts a local instance, applies schema.sql, writes POSTGRES_* vars to .env, and later migrates the same schema to a production ClickHouse Cloud service.

Quick Start

Ask the agent to set up a local Postgres database for development using clickhousectl and connect it to your application.

Frequently Asked Questions about infra-postgres

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up a local Postgres database for development?

Run clickhousectl local postgres start to launch a Docker-backed Postgres instance with auto-assigned port and generated password. Use clickhousectl local postgres client to run queries and clickhousectl local postgres dotenv to write connection variables into your .env file.

How do I create a managed Postgres service in ClickHouse Cloud?

Authenticate with an API key via clickhousectl cloud auth login, then run clickhousectl cloud postgres create with --name, --region, and --size. Poll the service status with postgres list and get until it is running, then reset the password and fetch the CA bundle to connect.

Does clickhousectl local Postgres require psql installed?

No, the local postgres client command wraps psql and runs it inside the Docker container if psql is not on the host PATH. Docker itself must be installed and running for local instances to work.

Can I move a local Postgres schema to ClickHouse Cloud production?

Yes, apply the same schema files to the cloud service using the local postgres client in explicit-host mode with the cloud endpoint, port, user, and database. The local workflow documentation explicitly hands off to the cloud workflow for production.

How do I restore a ClickHouse Cloud Postgres service to a point in time?

Run clickhousectl cloud postgres restore with the service ID, a new service name, and an RFC 3339 restore target timestamp. This creates a new service from the source's backups without modifying the original service.

Why does clickhousectl cloud Postgres login fail with OAuth?

Cloud Postgres write operations such as create, update, delete, and restore require API key authentication because OAuth login is read-only. Create an API key in the ClickHouse Cloud console under Settings, then log in with the key ID and secret.