<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 22, 2016 at 2:13 AM, Peter Rabbitson <span dir="ltr"><<a href="mailto:rabbit+dbic@rabbit.us" target="_blank">rabbit+dbic@rabbit.us</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Greetings!<br>
<br>
I am sending this to the list, but I specifically want to hear from Bill Moseley, as I know they (used to) run an involved Pg replicated setup.<br></blockquote><div><br></div><div>I'll take a closer look tomorrow, but our Pg replication setup has changed quite a bit.</div><div><br></div><div>We were using Slony and had added code to check replicant (slave) lag and when exceed a threshold would stick to the master. We did experience lags often.</div><div><br></div><div>We would also stick to the master (for a given user) after an update for about the current replicant lag.</div><div><br></div><div>Me moved to using Postgresql native replication support. But, we removed the replicant lag checks because we now do that via HAProxy -- and HAProxy falls back to the master if needed. We use PgBouncer for connection pooling.</div><div><br></div><div>I know it doesn't sound like it, but it simplifies things a bit. The apps are just configured for a master and a single replicant using the existing DBIC replication code and the slave should always be available (even if all real replicants have failed because will ultimately fall back to the master).</div><div><br></div><div>Also, this means DBAs can add or move replicants (or promote a replicant to a master) w/o making any application changes.</div><div><br></div><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
There is a proposal to "bless" the Pg 9.0 hot-standby replication into the core DBIC::Storage::DBI::Pg driver: <a href="https://github.com/dbsrgits/dbix-class/pull/103/files" rel="noreferrer" target="_blank">https://github.com/dbsrgits/dbix-class/pull/103/files</a><br>
<br>
The patch itself is small and straightforward. But given this is a one-way change (we can't un-bless it once it ships) I want to ask the thoughts of any existing users.<br>
<br>
This "request for comments" will be open for about a week, so please do speak up sooner rather than later.<br>
<br>
Cheers<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Bill Moseley<br><a href="mailto:moseley@hank.org" target="_blank">moseley@hank.org</a></div>
</div></div>