Re: PG replication across DataCenters - Mailing list pgsql-general

From Albe Laurenz
Subject Re: PG replication across DataCenters
Date
Msg-id A737B7A37273E048B164557ADEF4A58B17C5EEB7@ntex2010i.host.magwien.gv.at
Whole thread Raw
In response to Re: PG replication across DataCenters  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: PG replication across DataCenters  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-general
Michael Paquier wrote:
> On Fri, Nov 22, 2013 at 10:03 PM, Kaushal Shriyan <kaushalshriyan@gmail.com> wrote:
>> I am not sure i understand the difference between async and sync replication
>> and on what scenarios i should use async or sync replication. Does it mean
>> if it is within same DC then sync replication is the best and if it is
>> across DC replication async is better than sync. Please help me understand.

> In the case of synchronous replication, master node waits for the
> confirmation that a given transaction has committed on slave side
> before committing itself. This wait period can cause some delay, hence
> it is preferable to use sync replication with nodes that far from each
> other.

I am sure that you wanted to say
"with nodes *not* that far from each other".

Basically, you have to choose between these options:
- Slow down processing, but don't lose a transaction on failover
  (this would be synchronous, nodes close to each other)
- Replicate over longer distances, but possibly lose some
  transactions on failover (that would be asynchronous).

Yours,
Laurenz Albe

pgsql-general by date:

Previous
From: Dorian Hoxha
Date:
Subject: Multiple aggs,sums in 1 query
Next
From: Adrian Klaver
Date:
Subject: Re: Browsing postgres database using the Eclipse QuantumDB plugin