Re: [gelöst] Probleme Replikation aufzusetzen

"Gunnar \"Nick\" Bluth" <[email protected]> Wed, 31 Jan 2018 16:49:37 +0100
Newsgroups gmane.comp.db.postgresql.german
Message-ID <[email protected]>
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--ycUOqTbcCHZZ6RdX44rcjobCZhah8lPYv
Content-Type: multipart/mixed; boundary="BAgA5HewF5HpyiX9DQXt2vKM1AUutbr7h";
 protected-headers="v1"
From: "Gunnar \"Nick\" Bluth" <[email protected]>
To: [email protected]
Message-ID: <[email protected]>
Subject: =?UTF-8?Q?Re:_[gel=c3=b6st]_Probleme_Replikation_aufzusetzen?=
References: <[email protected]>
 <[email protected]>
 <[email protected]>
 <[email protected]>
 <[email protected]>
 <[email protected]>
 <[email protected]>
 <[email protected]>
 <[email protected]>
 <[email protected]>
 <[email protected]>
 <[email protected]>
 <[email protected]>
 <[email protected]>
 <[email protected]>
 <[email protected]>
 <[email protected]>
 <[email protected]>
In-Reply-To: <[email protected]>

--BAgA5HewF5HpyiX9DQXt2vKM1AUutbr7h
Content-Type: text/plain; charset=utf-8
Content-Language: de-DE
Content-Transfer-Encoding: quoted-printable

Am 31.01.2018 um 16:21 schrieb Thiemo Kellner:
> Vielen Dank an Andreas Kretschmer und die anderen der Liste, die mir
> geholfen haben. Ich habe unten nun die funkntionierenden Abweichungen
> von den Standardeinstellungen aufgef=C3=BChrt.
>=20
> Zun=C3=A4chst war mein Fehler, dass ich nicht begriffen habe, dass jede=
r
> Standby eines Streaming-Masters ein Klon sein muss (z. B. =C3=BCber
> pg_basebackup), zwei logisch gleiche Datenbanken, z. B. zwei
> jungfr=C3=A4uliche Initialisierungen, funktioniert nicht. Das Master-Lo=
g
> zeigt dann einen Fehler, dass die Identifier nicht =C3=BCbereinstimmen.=
 Die
> Dateien des Base-Backup habe ich einfach ins Datenverzeichnis des
> Standbys kopiert. Ob dies nur im Falle frisch initialisierter
> Datenbanken funktioniert oder ob dies das regul=C3=A4re Vorgehen ist, i=
st mir
> nicht klar geworden.

Das Grundprinzip ist immer so, ja.
Am einfachsten machst du pg_basebackup direkt in dein neues
Ziel-Directory (und mit "-X stream -R"), dann hast du auch schon eine
rudiment=C3=A4re recovery.conf und wei=C3=9Ft direkt, ob die Replikation =
danach
funktionieren wird.

Vielleicht bekommen wir das ja mal deutlicher in der Doku ausgewiesen...


> Es ist wichtig, dass nicht nur in
> postgres.config-synchronous_standby_names f=C3=BCr jeden Standby ein
> Applikationsname eingetragen wird, sondern auch dass in jeweils einer
> dieser Applikationsnamen in recovery.conf-primary_conninfo im Parameter=

> application_name gef=C3=BChrt wird - f=C3=BCr jeden Standby ein eigener=
=2E Nur so
> ist es Master m=C3=B6glich, die Erfolgsmeldungen der Standbys zuzuordne=
n.

Wenn du keine genaue Bestimmung haben willst, kannst du auch alle gleich
benennen ("einer der 'main'-Secondarys soll synchron sein").
Du k=C3=B6nntest in deinem Fall auch beide "main" nennen. Im Echtbetrieb =
(mit
2 Knoten) w=C3=BCrde ich das auch so machen, da ist das Risiko der
Verzettelung geringer...


Gru=C3=9F,
--=20
Gunnar "Nick" Bluth
RHCE/SCLA

Mobil +49 172 8853339
Email: [email protected]
_____________________________________________________________
In 1984 mainstream users were choosing VMS over UNIX.
Ten years later they are choosing Windows over UNIX.
What part of that message aren't you getting? - Tom Payne



--BAgA5HewF5HpyiX9DQXt2vKM1AUutbr7h--

--ycUOqTbcCHZZ6RdX44rcjobCZhah8lPYv
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJaceWXAAoJEBAQrmsyiTOM7J8IAIOTr3UGejr+/Y/KH+Zawk6r
UD9FpQRoov3e4l/rbuWLOdcpSVSTb2ITnKwotOprPYLuvYD8tvF5eJtz5Q1kuxkC
1gHlkp2jh35d2meCiI9VOsdiWuKYstMqqz2b+VXitX1EIBi277smidvoOaC28AnI
Dbc37w6CM8Gf8HbrxLj2BAq8vLuSQvQne7GbiD5br+f+VniQIN51SkC93MnxvGgT
s8+NMR461ID0i4m9ggx2uGwA10mdIlTqtr7Ey0yRe2kQP+DU/XJhSNrVW8rYWRgt
jfK2l/8za663Osu1zyuXxMY3abVnioBvXBUrMjNF4pQQfzz9l9EpFwgd2fxufn8=
=d8r4
-----END PGP SIGNATURE-----

--ycUOqTbcCHZZ6RdX44rcjobCZhah8lPYv--