Re: Standalone synchronous master

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Standalone synchronous master
Дата
Msg-id 20140108223456.GQ14280@awork2.anarazel.de
обсуждение исходный текст
Ответ на Re: Standalone synchronous master  ("Joshua D. Drake" <jd@commandprompt.com>)
Ответы Re: Standalone synchronous master  ("Joshua D. Drake" <jd@commandprompt.com>)
Список pgsql-hackers
On 2014-01-08 14:23:34 -0800, Joshua D. Drake wrote:
> 
> On 01/08/2014 01:55 PM, Tom Lane wrote:
> 
> >Sync mode is about providing a guarantee that the data exists on more than
> >one server *before* we tell the client it's committed.  If you don't need
> >that guarantee, you shouldn't be using sync mode.  If you do need it,
> >it's not clear to me why you'd suddenly not need it the moment the going
> >actually gets tough.
> 
> As I understand it what is being suggested is that if a subscriber or target
> goes down, then the master will just sit there and wait. When I read that, I
> read that the master will no longer process write transactions. If I am
> wrong in that understanding then cool. If I am not then that is a serious
> problem with a production scenario. There is an expectation that a master
> will continue to function if the target is down, synchronous or not.

I don't think you've understood synchronous replication. There wouldn't
be *any* benefit to using it if it worked the way you wish since there
wouldn't be any additional guarantees. A single reconnect of the
streaming rep connection, without any permanent outage, would
potentially lead to data loss if the primary crashed in the wrong
moment.
So you'd buy no guarantees with a noticeable loss in performance.

Just use async mode if you want things work like that.

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: Standalone synchronous master
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: commit fest manager?