fix(replicas): use PUBLISHER_DSN when DATABASE_URL breaks pg_dump

Prisma DATABASE_URL passwords with @ confuse libpq URI parsing (host
Montime@127.0.0.1). Repair scripts now prefer explicit PUBLISHER_DSN.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-18 12:41:23 +03:30
co-authored by Cursor
parent 693b1ef93e
commit 26630cecf6
2 changed files with 39 additions and 8 deletions
+5
View File
@@ -9,3 +9,8 @@ postgresql://USER:PASSWORD@SLAVE_2_IP:5432/superadmin"
# Read-only app user on replicas (program-settings API). Grants re-applied after data repair.
# REPLICA_APP_DB_USER=montime
# Publisher DB for pg_dump / count checks. Required when DATABASE_URL password has @
# (Prisma tolerates it; libpq URI parsing breaks → host "Montime@127.0.0.1").
# Use postgres superuser on localhost; URL-encode special chars (@ → %40).
# PUBLISHER_DSN="postgresql://postgres:PASS@127.0.0.1:5432/superadmin"