Re: Replicating new sequences

From: Jan Wieck <JanWieck(at)Yahoo(dot)com>
To: Todd Eddy <teddy(at)technologyimaging(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Replicating new sequences
Date: 2005-09-26 18:02:48
Message-ID: 433837C8.5070709@Yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)Yahoo(dot)com #

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Mike Nolan 2005-09-26 18:32:38 Re: Data Entry Tool for PostgreSQL
Previous Message Jim C. Nasby 2005-09-26 17:58:41 Re: insertion becoming slow