Re: Bi-Directional replication client awareness - Mailing list pgsql-general

From Andres Freund
Subject Re: Bi-Directional replication client awareness
Date
Msg-id 20140712124802.GC3494@awork2.anarazel.de
Whole thread Raw
In response to Bi-Directional replication client awareness  (Martin Gudmundsson <martingudmundsson@gmail.com>)
Responses Re: Bi-Directional replication client awareness  (Martin Gudmundsson <martingudmundsson@gmail.com>)
Re: Bi-Directional replication client awareness  (Martin Gudmundsson <martingudmundsson@gmail.com>)
BDR: Strange values in pg_stat_replication  (Martin Gudmundsson <martingudmundsson@gmail.com>)
List pgsql-general
On 2014-07-12 14:37:02 +0200, Martin Gudmundsson wrote:
> > It's possible to do it to a streaming replication sync standby, but also
> > to another BDR node. The logical decoding facility added in 9.4 allows
> > logical replication solutions to use the same mechanism as streaming rep
> > does.
> >
>
> Sounds interesting, but it does not sound like it’s being bi-directional in that case?

It is bidirectional if you configure a bdr node in
synchronous_standby_names.

Note that streaming replication's synchronous mode probably doesn't give
the guarantees you're thinking it does:
a) A sent commit might succeed locally on the primary, but the system
might fail to send it to the synchronous standby. I.e. postgres'
synchronous replication of normal commits is *not* 2-safe.
b) Even if a transaction is replicated to the standby it's *not*
guaranteed to be applied. All that's guaranteed is that it has been
shipped to the synchronous standby.

> Ideally I’m looking for a solution where I can run an application and it does not really matter on what node a
transactionexecutes, or if it changes data or not. 

I'd like that too, but I don't think that's going to happen. There's
just too many caveats (CAP theorem et al) to make that generally
useful/applicable.
I think we (as in postgres) will probably get the ability to run
individual transactions in such a mode, but you surely wouldn't want to
run every transaction in it.

Greetings,

Andres Freund

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


pgsql-general by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Bi-Directional replication client awareness
Next
From: Martin Gudmundsson
Date:
Subject: Re: Bi-Directional replication client awareness