Files
api/deploy/replicas.env.example
mohmdsdgandCursor c4b814727a fix(replicas): GRANT SELECT on publisher tables to repl_user
settings/setting_templates were created after replica setup, so the
subscription COPY user could not read them and tablesync looped.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-18 16:01:29 +03:30

16 lines
885 B
Bash

# Copy to deploy/replicas.env on the publisher host (gitignored — holds passwords).
#
# One DSN per line (or comma). Do not put spaces between URLs.
# Prefer URI form. Password must not contain @ : / # ? — or URL-encode it.
# Keyword form (host=...) is OK only because the script splits on newlines, not spaces.
# The user must be able to run ALTER TABLE + ALTER SUBSCRIPTION + TRUNCATE on each replica.
REPLICA_DSNS="postgresql://USER:PASSWORD@SLAVE_1_IP:5433/superadmin
postgresql://USER:PASSWORD@SLAVE_2_IP:5432/superadmin"
# Replication user that subscribers use to COPY from this publisher (must SELECT every table).
# REPL_PUBLISHER_USER=repl_user
# 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"