Nex Postgres Multi Instance

Manage multiple Postgres versions and extensions on one Linux box with a port registry and unified backups.

Install
cmdop skills install agensi-nex-postgres-multi-instance

Run Multiple Postgres Instances Peacefully
Running multiple databases on a single Linux machine often leads to port collisions, authentication headaches (“Peer authentication failed”), and backup gaps. This skill implements a battle-tested operational pattern for developers who need to host multiple isolated Postgres environments—such as pgvector, TimescaleDB, and vanilla Postgres—side-by-side without version conflicts or high managed-database bills.

What it does
The skill generates a hard-coded infrastructure folder (postgres-multi/) containing everything needed to manage your database fleet:

  • Port Registry: A canonical mapping to prevent port collisions between services.
  • Multi-Instance Configs: Templates for both Debian-managed clusters and Docker containers (pgvector, TimescaleDB, vanilla).
  • Hardened Security: Automatic 127.0.0.1 binding and SCRAM-SHA-256 authentication setup to prevent credential-spraying.
  • Unified Backups: A central shell script that iterates through your registry to perform gzipped nightly dumps with auto-pruning.
  • Fix Scripts: One-shot utilities to resolve common “peer authentication” issues and check port availability.

Why use this skill?
Unlike a generic AI prompt, this skill enforces strict operational standards: it ensures every volume is app-prefixed to prevent accidental data deletion, insists on non-root app roles, and provides a documented upgrade path for when the next Postgres major version ships. It transforms a messy “db-on-a-box” setup into a professional, registry-backed database platform.
Built by Nex AI. More skills and info at nex-ai.be and slopsome.com.