- Home
- Skills
- Data & Databases
- PostgreSQL Major Upgrade: Preflight, Rehearsal, Runbook
Works with the AI Agents you already use
PostgreSQL Major Upgrade: Preflight, Rehearsal, Runbook
Upgrade PostgreSQL 14-17 to 18 with a read-only preflight, a timed rehearsal on real data, a runbook with rollback per method and row-count verification.
$19
PostgreSQL Major Upgrade: Preflight, Rehearsal, Runbook
Example session with this skill installed
Request: "We're still on Postgres 14 and it's out of support. Can we go to 18 this weekend? How long will it be down?"
- Read your context and instructions
- Compiled the postgresql major upgrade
The agent runs the read-only preflight, then the rehearsal on a copy of the data:
WARN eol PostgreSQL 14 reached end-of-life on 2026-11-12
WARN checksums source has data checksums OFF; initdb 18 enables them by default and pg_upgrade then refuses to run
fix: initdb the new cluster with --no-data-checksums
WARN md5-passwords 1 role still uses MD5 hashes (deprecated in 18)
INFO extensions shop: install hstore, pg_trgm for 18
| Step | Result | Seconds |
| pg_upgrade --check | pass | 1.9 |
| pg_upgrade --swap (downtime) | pass | 2.7 |
| Verify + analyze + extensions | pass | 1.1 |
Post-upgrade: server major 18, exact row counts match, vacuumdb --missing-stats-only done. Verdict: PASS
Result: the agent fixes the checksum mismatch before the window instead of discovering it at 2 a.m., gives a downtime estimate measured on your data, and writes a runbook with the rollback for the chosen method (link mode: the old cluster is unusable once the new one starts, so the snapshot step is mandatory).
Connects securely to your tools. The creator never sees your data.
About this skill
PostgreSQL major upgrades without surprises: a read-only preflight that knows what 18 breaks (data checksums on by default, removed settings, reg* columns, MD5, slots), a rehearsal of the real pg_upgrade on a copy with measured downtime, a runbook with rollback for link/copy/clone/swap, and post-upgrade verification. PostgreSQL 14 went end-of-life on 12 November 2026.
Why this instead of a free prompt
Free skills ask the model to "be careful". These ship executable gates: a PostgreSQL upgrade is rehearsed with the real pg_upgrade before the window; a Quadlet unit with a wrong key is rejected by Podman's own generator; a volume cutover that turns unhealthy rolls itself back; a patch run stops at the first broken host. Every script was run against real PostgreSQL 14 and 18, Docker 29, Podman 4.9, ansible-core 2.22, OpenSSL and Prometheus promtool before release.
How it keeps you safe
- Read-only pre-flight first: diagnostics that change nothing.
- Dry-run by default. Anything that changes state needs an explicit apply step and a typed confirmation.
- Rollback built in, and guardrails that refuse unsafe input.
- No secrets printed in output.
Requirements
Python 3.8+, psql; Docker for the rehearsal. Source PostgreSQL 14-17 (13 and older with extra checks), target 15-18. RHEL/AlmaLinux 8+ (PGDG) and Debian 11+/Ubuntu 20.04+ (pg_upgradecluster).
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Data & Databases.
Not for: Minor version updates (just install the package), managed services (RDS, Cloud SQL, Azure upgrade them for you), MySQL. Requires Python 3.8+, psql, and Docker for the rehearsal.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 5 days ago
- Software
Python 3.8+psql
Docker