Pour les versions de PostgreSQL supérieures à 10
Mathieu RIBES
v 1.2 (17 novembre 2020)
Sur l’instance d’origine (primaire)
wal_level
wal sender
max_wal_senders
max_replication_slots
Sur l’instance de destination (réplicat)
logical replication worker
Réplication complète
CREATE PUBLICATION bd1_publication FOR ALL TABLES;
Réplication partielle
CREATE PUBLICATION bd1_publication FOR TABLE t1,t2,...;
Réplication croisée
TRUNCATE
CREATE PUBLICATION ... FOR ALL TABLES
GRANT SELECT ON ALL TABLES IN SCHEMA public TO user_repli
pg_dumpall -g
pg_dump --schema-only
Sur l’instance destination (replicat)
CREATE SUBSCRIPTION ... CONNECTION ... PUBLICATION ...
SELECT * FROM pg_subscription_rel
pg_hba.conf
DROP SUBSCRIPTION ...
SELECT * FROM pg_stat_replication
SELECT * FROM pg_stat_subscription