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>
A second logical copy unique-conflicts on existing PKs and leaves
tablesync workers stuck, so live UPDATEs never apply on slaves.
Co-authored-by: Cursor <cursoragent@cursor.com>
TCP 127.0.0.1:15432 is often closed; the cluster listens on a unix
socket. Fall back to /var/run/postgresql then runuser -u postgres.
Co-authored-by: Cursor <cursoragent@cursor.com>
Passwords with @ broke libpq URIs; convert to keyword conninfo.
pg_dump -t public."table" produced empty dumps so replicas stayed at 0.
Co-authored-by: Cursor <cursoragent@cursor.com>
Operator --repair was blocked when pm2 watch owned /tmp lock file.
Only --repair-if-needed uses flock; lock path moved under deploy/.
Co-authored-by: Cursor <cursoragent@cursor.com>
Add sync-replica-data repair on deploy, a publisher-side replica watch
(60s + after tenant/settings writes), REFRESH PUBLICATION after migrate,
and Cache-Control no-store on program-settings and get_version.
Co-authored-by: Cursor <cursoragent@cursor.com>