From 70b2f7caaeec86dbfa36ad9fe28f4208923c0fff Mon Sep 17 00:00:00 2001 From: emorino Date: Wed, 28 Oct 2020 15:27:46 +0100 Subject: [PATCH] Ajout user replication pg_hba.conf --- HowtoPostgreSQL/ReplicationLogique.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/HowtoPostgreSQL/ReplicationLogique.md b/HowtoPostgreSQL/ReplicationLogique.md index 7b2d05d2..16be41d0 100644 --- a/HowtoPostgreSQL/ReplicationLogique.md +++ b/HowtoPostgreSQL/ReplicationLogique.md @@ -33,6 +33,12 @@ foo=# CREATE PUBLICATION alltables FOR ALL TABLES; CREATE PUBLICATION ~~~ +Sur le primaire, on autorise l'utilisateur replication à se connecter dans `pg_hba.conf` : + +~~~ +host base replication 192.168.0.1/24 md5 +~~~ + Ensuite, il faut créer les tables de façon identique sur les bases, pour cela on dump le schema de la ou des bases concernée depuis le primaire vers le secondaire : ~~~