Gordon Shannon gordo169 at gmail.com
Thu Jul 16 21:22:39 PDT 2009

David Kerr wrote:
> 
> NodeA replicates to NodeB.
> 
> for my nightly processing, I have some jobs that will update a large
> number 
> of records, and would basically result in the system unavailable (could be 
> a few hours).
> 
> What I'd like to do, is to run those Jobs in NodeB and then at the end
> of the process "swap" NodeB and NodeA.
> 
> From what i've read of slony so far, I think i can do at least that much.
> 
> So the concern is - up until the "swap" I need to be able to access and
> even 
> update records in NodeA and I want to continue replicating between NodeA
> and 
> NodeB.
> 
> During that time, I can control the records that are inserted/updated in
> NodeA so I know that they wouldn't impact anything that is currently
> running into NodeB.
> 
> Is that possible? (is there a better/ or standard way that I'm missing?)
> 

I don't think so.  You don't say this, but I'm guessing the writes on NodeB
are into the same table as being inserted/updated on NodeA, and is
replicated?  If so, that won't work.

Let's say you have 2 tables, T1 and T2 that you are syncing from the origin
NodeA to the receiver NodeB, as part of a replication set.  You can't write
to T2 on NodeB during your maintenance, or ever, because Slony will have
triggers on the table to prevent writes outside of Slony itself.  Otherwise,
how could Slony guarantee that the tables are in sync?

You can, of course, write to Table2 on NodeB if T2 is not replicated.  But
then when you do the swap, all that T2 data would now only be on NodeB, not
on NodeA.  I guess you could create a set, sync the table, then destroy the
set (which leaves the data) every day before the nightly job, but know that
while the set is syncing the table will be exclusively locked by Slony on
the receiver side.  If it's a large table that would likely be impractical.

Hope this helps a bit.
Gordon


-- 
View this message in context: http://www.nabble.com/Novice-replication-question-tp24524258p24528369.html
Sent from the Slony-I -- General mailing list archive at Nabble.com.



More information about the Slony1-general mailing list