Replication

Поиск
Список
Период
Сортировка
Искать

Replication

От:
Jürgen Purtz <juergen@purtz.de>
Дата:
 Hi all,

replication is a complex topic, so I tried to get a systematic view on it. Among others I found 4 mutually independent (?) concepts:
  • Log-Shipping vs. Streaming (LS vs. S)
  • Physical Format vs. Logical Decoded Format (PFo vs. LFo)
  • Synchronous vs. asynchronous transfer (STr vs ASTr)
  • hot standby vs. warm standby
'Mutually independent' implies that there are 2 power 4 = 16 possible combinations. But I believe, there are some limitations.

First, hot and warm standby (at the standby site) are possible in all cases. Second, for me the following 5 out of 8 seems to be possible:

LS - PFo - ASTr  (Asynchronous Log-shipping in Physical Format)
S - PFo - STr      (Synchronous Streaming in Physical Format)
S - PFo - ASTr  (Asynchronous Streaming in Physical Format)
S - LFo - STr    (Synchronous Streaming in Logical Format)
S - LFo - ASTr  (Asynchronous Streaming in Logical Format)

My questions are:
  1. Do you agree to this systematization into 4 categories?
  2. Do you agree, that only this 5 out of 8 possibilities exist?

Regards
Jürgen Purtz

Re: Replication

От:
Steve Midgley <science@misuse.org>
Дата:
On Wed, Feb 3, 2016 at 10:46 AM, Jürgen Purtz <juergen@purtz.de> wrote:
Hi all,

replication is a complex topic, so I tried to get a systematic view on it. Among others I found 4 mutually independent (?) concepts:
  • Log-Shipping vs. Streaming (LS vs. S)
  • Physical Format vs. Logical Decoded Format (PFo vs. LFo)
  • Synchronous vs. asynchronous transfer (STr vs ASTr)
  • hot standby vs. warm standby
My questions are:
  1. Do you agree to this systematization into 4 categories?
  2. Do you agree, that only this 5 out of 8 possibilities exist?
I think you're actually asking what replication strategies Postgres supports out of the box, and of those which are viable combinations? If so, someone else will have to say whether your categories are comprehensive.

If you are asking about what replication strategies are possible more broadly (and implementable with Postgres) the list gets bigger. I've messed around with MVCC (multi-version concurrency control) and there are several implementations out there - I looked at PouchDB in javascript and it seemed plausible to implement on top of specifically organized Postgres DBs. This could enable a master-master federated data replication network with no central authority. Record collisions are unhappy possibilities, and locking anything becomes impossible in a meaningful way. Notable also that getting good test case coverage is pretty hard.

But if you are trying to find strategies to replicate your data, in some cases that's an interesting approach..

Steve
FAQ