n8n AI Agent Race Conditions: 3 Atomic Claiming Patterns
Prevent double bookings from concurrent n8n AI agents: atomic claim with INSERT ON CONFLICT, a pending/done two-phase, and re-read state before writes.
Prevent double bookings from concurrent n8n AI agents: atomic claim with INSERT ON CONFLICT, a pending/done two-phase, and re-read state before writes.
Migrate n8n from SQLite to PostgreSQL with the CLI: export entities, provision Postgres, repoint n8n via DB_POSTGRESDB_* variables, import, and verify.
Install Postgres MCP Pro in restricted mode behind a least-privilege read-only role: safe AI access to PostgreSQL, each step tested on a live database.
Connect n8n to PostgreSQL step by step: create credentials, run Execute Query, insert, select, and update rows, and fix the five most common connection errors.
Set up n8n with Docker Compose, Postgres, and queue mode with Redis workers. Complete compose file, .env template, safe upgrades, backups, and five real fixes.
Install n8n on an Ubuntu VPS with Docker Compose, Postgres 18, and free HTTPS via Caddy. Verified against n8n 2.40.7, including the new npm deprecation warning and four real-world fixes.