Probleme Replikation aufzusetzen
Thiemo Kellner <[email protected]> Sun, 28 Jan 2018 23:25:39 +0100
| Newsgroups | gmane.comp.db.postgresql.german |
|---|---|
| Organization | Gelassene Pferde |
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format. --------------C9195E180E4851989C61A941 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Hallo Ich versuche, Replication zum Laufen zu bekommen. Ich habe Debian 9 mit PostreSQL 10. Ich habe zwei Knoten in einem Cluster und bin mir bewusst, dass dies leicht zum Deadlock des Masters führen kann und dass es sinnlos ist, Replikation auf demselben Blech zu machen - außer es geschieht, um die Replikation zu lernen - es sei denn, Replikation im selben Knoten funtioniert ohnehin nicht. Ich bin mir nicht sicher, ob ich das Passwort in primary_conninfo Klartext sein muss oder dessen md5-Wert. Die Doku ist mir da nicht klar. Ich habe beides versucht und bin zu keinem Ergebnis gekommen. Ich konnte mit diesem Setup nicht fest stellen, dass der Standby versucht hat, sich mit dem Master zu verbinden. Unten meine Konfigurationen LG Thiemo == Hot standby == /etc/postgresql/10/main2/pg_hba.conf host replication all 127.0.0.1/32 md5 host replication all ::1/128 md5 local replication repuser peer host replication repuser 0.0.0.1/0 md5 host replication repuser ::1/0 md5 /etc/postgresql/10/main2/postgresql.conf wal_level = replica max_replication_slots = 12 synchronous_standby_names = 'main,main2' hot_standby = on log_min_messages = debug1 log_connections = on log_statement = 'ddl' log_replication_commands = on lc_messages = 'C.UTF-8' /etc/postgresql/10/main2/recovery.conf standby_mode = 'on' primary_conninfo = 'host=localhost user=repuser port=5432 password=<md5 value or plain text?>' == master == /etc/postgresql/10/main/pg_hba.conf host replication all 127.0.0.1/32 md5 host replication all ::1/128 md5 local replication repuser peer host replication repuser 0.0.0.1/0 md5 host replication repuser ::1/0 md5 /etc/postgresql/10/main/postgresql.conf wal_level = replica archive_mode = off max_wal_senders = 12 max_replication_slots = 12 synchronous_standby_names = 'main2,main' hot_standby = on wal_receiver_timeout = 60s log_min_messages = debug1 log_connections = on log_statement = 'ddl' log_replication_commands = on lc_messages = 'C.UTF-8' /etc/postgresql/10/main/recovery.conf standby_mode = 'off' primary_conninfo = 'host=localhost user=repuser port=5433 password=<md5 value or plain text?>' -- Öffentlicher PGP-Schlüssel: http://pgp.mit.edu/pks/lookup?op=get&search=0xCA167FB0E717AFFC --------------C9195E180E4851989C61A941 Content-Type: text/x-vcard; charset=utf-8; name="thiemo.vcf" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="thiemo.vcf" begin:vcard fn:Thiemo Kellner n:Kellner;Thiemo adr:;;Landstr. 34;Weilheim-Bannholz;BW;79809;Deutschland email;internet:[email protected] tel;work:+49 1578 772 37 37 tel;cell:+41 78 947 36 21 note;quoted-printable:Auf Gelassene Pferde kann man bauen!=0D=0A= +49 (0)1578-772 37 37 (Mo, Di)=0D=0A= +41 (0)78 947 36 21 (Mi - Fr)=0D=0A= sip: [email protected]=0D=0A= Skype: thiemo.kellner=0D=0A= http://www.gelassene-pferde.biz=0D=0A= Mitglied bei http://www.keep-it-natural.org=0D=0A= =C3=96ffentlicher PGP-Schl=C3=BCssel: http://pgp.mit.edu/pks/lookup?op=3D= get&search=3D0x8F70EFD2D972CBEF x-mozilla-html:FALSE url:http://www.gelassene-pferde.biz version:2.1 end:vcard --------------C9195E180E4851989C61A941--