{
  "id": 15421280,
  "title": "Five Agents, One Dev Database: Clone a Postgres per Worktree With Postgres 18",
  "url": "https://urgent.news/2026/10/18/five-agents-one-dev-database-clone-a-postgres-per-worktree-with",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-18T14:01:30.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/gabrielanhaia/five-agents-one-dev-database-clone-a-postgres-per-worktree-with-postgres-18-je7"
  },
  "original_language": "en",
  "account": "Five agents collaborated on a project by creating individual databases for each worktree within a Postgres 18 environment. Each worktree, which had its own branch, files, and dependencies, was assigned a unique database copy. This approach eliminated the need for separate Postgres servers per worktree, instead utilizing the file_copy_method set to clone on a copy-on-write filesystem.\n\nThe clone command created a database named after the worktree's branch and stored the database URL in the respective .env file. This setup enabled each agent to work independently without interfering with one another, as worktrees isolated files but not databases. The clone method, introduced in Postgres 18, shared blocks on the filesystem until a write occurred, resulting in significant time and resource savings compared to traditional database per branch approaches.",
  "summary": "Book: Database Playbook Also by me: Thinking in Go (2-book series) — Complete Guide to Go Programming + Hexagonal Architecture in Go My project: Hermes IDE | GitHub — an IDE for developers who ship with Claude Code and other AI coding tools Me: xgabriel.com | GitHub One agent is in ../app-auth , renaming users.email to users.login_email . Another is in ../app-invoices , about to run its test…",
  "key_points": [
    "Five agents cloned Postgres databases per worktree in Postgres 18.",
    "Each worktree had its own database copy using filecopymethod.",
    "Clone command created databases named after worktree branches."
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}