From: | Alex Vinogradovs <AVinogradovs(at)Clearpathnet(dot)com> |
---|---|
To: | Greg Smith <gsmith(at)gregsmith(dot)com> |
Cc: | SHARMILA JOTHIRAJAH <sharmi_jo(at)yahoo(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: record-based log shipping |
Date: | 2007-12-08 03:02:39 |
Message-ID: | 1197082959.1152.105.camel@localhost |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
How about writing a C function (invoked from a trigger) that will send
the serialized tuple using say UDP protocol (considering you're syncing
on a reliable LAN), and then a simple UDP-listening daemon that will
perform the insert into the slave one. If you have multiple slaves, can
use that with broadcasting....
Alex.
On Fri, 2007-12-07 at 21:38 -0500, Greg Smith wrote:
> On Thu, 6 Dec 2007, SHARMILA JOTHIRAJAH wrote:
>
> > Have anyone implemented or tried record-based log shipping? If so is
> > there any other materials in the web other than the documentation (it
> > has very few details about this)
>
> There is an implementation of that as part of the Skytools WalMgr code:
> https://developer.skype.com/SkypeGarage/DbProjects/SkyTools
>
> Some sample interesting parts are in the walmgr.py file, in the
> master_sync function, where they run
>
> select file_name, file_offset from pg_xlogfile_name_offset(pg_current_xlog_location())
>
> and then copy that section of the current WAL file over.
>
> It's kind of hard to reuse any portion of their solution without adopting
> the whole thing, but it's a decent approach if you're comfortable with
> Python code.
>
> --
> * Greg Smith gsmith(at)gregsmith(dot)com http://www.gregsmith.com Baltimore, MD
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend
From | Date | Subject | |
---|---|---|---|
Next Message | Greg Smith | 2007-12-08 03:44:14 | Re: record-based log shipping |
Previous Message | Greg Smith | 2007-12-08 02:38:00 | Re: record-based log shipping |