Re: Replication with non-read-only standby.

From: Moreno Andreo <moreno(dot)andreo(at)evolu-s(dot)it>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Replication with non-read-only standby.
Date: 2016-07-01 08:55:31
Message-ID: 7ec676c8-4726-bf56-1449-57daba7d26f7@evolu-s.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Il 01/07/2016 05:21, Venkata Balaji N
ha scritto:<br>
</div>
<blockquote
cite="mid:CAEyp7J_pXRSjuWcYH9wA+LYYjwniC52VgO-S-ROjW=V+7q73Yg(at)mail(dot)gmail(dot)com"
type="cite">
<div dir="ltr">
<div class="gmail_extra"><br>
<div class="gmail_quote">On Thu, Jun 30, 2016 at 11:15 PM,
Nick Babadzhanian <span dir="ltr">&lt;<a
moz-do-not-send="true" href="mailto:nb(at)cobra(dot)ru"
target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:nb(at)cobra(dot)ru">nb(at)cobra(dot)ru</a></a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Setup:<br>
2 PostgreSQL servers are geographically spread. The first
one is used for an application that gathers data. It is
connected to the second database that is used to process
the said data. Connection is not very stable nor is it
fast, so using Bidirectional replication is not an option.
It is OK if data is shipped in batches rather than
streamed.<br>
<br>
Question:<br>
Is there a way to make the standby server non-read-only,
so that it can keep getting updates (mostly inserts) from
the 'master', but users are able to edit the data stored
on 'slave'? Is there some alternative solution to this?<br>
</blockquote>
<div><br>
</div>
<div>You can consider Ruby replication for such a
requirement. I think, there is no much development
happening around Ruby Replication since long time i
believe. This can be used for production environment.</div>
<div><br>
</div>
<div><a moz-do-not-send="true"
href="http://www.rubyrep.org/">http://www.rubyrep.org/</a><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>Regards,</div>
<div>Venkata B N</div>
<div><br>
</div>
<div>Fujitsu Australia</div>
</div>
</div>
</div>
</blockquote>
<br>
I'm using rubyrep actively in the last 5 years, and that's what in
my experience<br>
<br>
The replicator is very good and stable, easy as 1-2-3 to configure
(if you don't need special features), but the project is almost dead
(I've seen no updates since 2009 and no responses in forums since
2011). <br>
I've tried many times to email the author because of PG 9.1 changes
in bytea management that caused BLOB corruption while replicating,
but never had response, so ended hiring a Ruby developer to fix
things.<br>
<br>
One more thing: rubyrep is OK if you want to replicate ONE database,
I've never seen it working on more than 1 database or a whole
cluster. Of course you can run more than one instance, but will be
harder to manage.<br>
If replicating on *nix I'd prefer Bucardo or Slony<br>
<br>
Remember, when using async replication with unreliable network, that
your replication can fall far behind "actual" data and this can lead
to conflicts, that must be resolved.<br>
Not to mention the huge memory consumption when working with large
data types and when replication queues get quite big (&gt;300k
rows). In this cases, if JVM memory cap is not large enough(I
reached 2 GB), rubyrep is likely to stop for OutOfMemoryException<br>
<br>
My 50 cents<br>
Cheers,<br>
Moreno.<br>
</body>
</html>

Attachment Content-Type Size
unknown_filename text/html 3.9 KB

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Chris Lewis 2016-07-01 10:04:46 Re: Log archiving failing. Seems to be wrong timeline
Previous Message Sridhar N Bamandlapally 2016-07-01 06:40:44 Re: table name size