On 2022-08-04 07:43:28 +0000, Sacheen Birhade wrote: > I have a very basic question about streaming replication feature of Postgres. > Let’s assume I have servers A, B, C, D, & E with postgres installed with > streaming replication as follow: > A à B ( sync replication ) > A à C ( async replication ) > A à D ( async replication ) > A à E ( async replication ) > A is master & rest are slaves. > > Now my question is: > Assume replication link between A & B may/may not stable.
Using sync replication on an unstable link is probably not a good idea.
Every time the link goes down, A freezes. Is this what you want?
> If A goes down, how will I choose my new master from slaves? What are
> criteria to choose new master?
I would prefer B over the others because it is in sync with A, so you
don't lose data. All the other ones might.
Otherwise: For the same reason I would prefer B, I would prefer the one
with the most up-to-date data. But there might be other considerations,
e.g. the network connections (bandwidth and delays) between the
surviving members and the clients.
hp
--
_ | Peter J. Holzer | Story must make more sense than reality.
|_|_) | |
| | | [email protected] | -- Charles Stross, "Creative writing
__/ | http://www.hjp.at/ | challenge!"
signature.asc
Description: PGP signature
