Re: Replicating new sequences - Mailing list pgsql-general

From Jan Wieck
Subject Re: Replicating new sequences
Date
Msg-id 433837C8.5070709@Yahoo.com
Whole thread Raw
In response to Replicating new sequences  (Todd Eddy <teddy@technologyimaging.com>)
List pgsql-general
On 9/22/2005 3:54 PM, Todd Eddy wrote:

> I know this gets asked all the time, but I'm having issues with
> replication.  I got Slony setup between two computers and that does
> replication of transactions.  But we have a table that because of how
> it works new sequences are added on a somewhat regular basis, maybe a
> couple times a day.  Also replication needs to be "almost" instant
> because we distribute the load so updates go to one database and
> selects happen on another database.  So having these sequences
> replicate on a fairly quick basis is important.
>
> I think what we need is a log based replication solution instead of
> the trigger based solution of Slony or other replication systems out

I think it makes little difference how the changes are recorded
(triggers or WAL log analysis). The thing that matters is that both are
asynchronous replication methods which allow the master to run ahead.

What you are asking for is a synchronous replication system.

I hope that your load balancing system is smart enough to at least
guarantee that "SELECT ... FOR UPDATE" queries are executed in the same
"master transaction" as their corresponding "UPDATE" queries. If that is
the case, you shouldn't really have much of a problem. If not, I am not
even sure a synchronous replication system under MVCC can guarantee
consistency for you.


Jan

--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #

pgsql-general by date:

Previous
From: Raj Gupta
Date:
Subject: Re: Error migrating from 7.4.3 to 8.0.3
Next
From: ruben
Date:
Subject: Re: SQL command to dump the contents of table failed: PQendcopy()