Re: Sync replication + high latency server

From: Edson Richter <edsonrichter(at)hotmail(dot)com>
To: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Sync replication + high latency server
Date: 2015-08-13 14:41:43
Message-ID: BLU436-SMTP722280953CAB09B473C240CF7D0@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Em 13/08/2015 00:40, Joshua D. Drake escreveu:
>
> On 08/12/2015 05:33 PM, Edson Richter wrote:
>> Hi!
>>
>> I've a situation where I would like to keep sync replication, where
>> servers have 10Mbps network connection but high latency (normally, ~20ms
>> but sometimes, 1000ms~2000ms, even 3000ms when network is under load).
>>
>> Considering that I will keep enough WAL files (let's say, 200 WAL
>> segments on a server with low write rate):
>>
>> What happens if I configure timeout in master server for, let's say, 10
>> seconds?
>> Will sync replication survive if timeout happens, and then, network
>> "recover" it self?
>
> I think you are misunderstanding how sync rep works.

I don't think so: sync replication will force commit on both databases
before returning OK to my app server.

>
>>
>> Or will I be obligated to use async replication in such scenario?
>>
>
> async is your friend here.

And what about the timeout when using sync replication? What will happen?

Thanks,

Edson

>
> JD
>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2015-08-13 15:14:16 Re: Sync replication + high latency server
Previous Message Tom Lane 2015-08-13 14:39:25 Re: Chars problem restoring to ps 8.4 (utf8) a dumped db from ps 8.1 (latin9)