From d055c50b94486e7763aea69548de5753653b3f05 Mon Sep 17 00:00:00 2001 From: adonis Date: Tue, 18 Aug 2026 15:09:59 +0330 Subject: [PATCH] fix(replicas): connect publisher via unix socket or postgres user TCP 127.0.0.1:15432 is often closed; dump/count now fall back to the cluster socket and runuser -u postgres, which already works on master. Co-authored-by: Cursor --- deploy/replicas.env.example | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/deploy/replicas.env.example b/deploy/replicas.env.example index 3c5a92a..613ff4d 100644 --- a/deploy/replicas.env.example +++ b/deploy/replicas.env.example @@ -10,6 +10,6 @@ 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. Prefer this if DATABASE_URL password contains @ (must be URL-encoded here). -# Master on montech-01 listens on 15432: -# PUBLISHER_DSN="postgresql://montime:09128081392%40Montime@127.0.0.1:15432/superadmin" +# Optional. If TCP 127.0.0.1:15432 is refused, omit this — the script falls back +# to unix socket / `runuser -u postgres` on port 15432. +# PUBLISHER_DSN="host=/var/run/postgresql port=15432 dbname=superadmin user=postgres"