Wed Mar 3 08:55:01 PST 2010
- Previous message: [Slony1-general] Monitoring using Nagios
- Next message: [Slony1-general] is it necessary to set session_replication_role in logshipper files?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Richard Yen <dba at richyen.com> writes: > Hello, > > I'm currently trying to set up the following architecture: > > -- B subscribes to A > -- B creates slony logshipper files > -- Separate rsync process ships files from B to C > -- C replays logshipper files > -- D subscribes to C > > Problem is, even though D is subscribed to C, no data changes are made on D. I've discovered the cause to be from the logshipper files--at the top of each file is the command "set session_replication_role to replica," which effectively turns off the triggers, thereby preventing events from being propagated from C to D. > > My question is, how dangerous is it to remove the command "set session_replication_role to replica" from each logfile? Is this required? > > Right now, I'm removing them by doing cat $logfile | grep -v "set session_replication_role to replica" | psql <dbname...etc>. Works for my purposes, but I was curious to know if there are some really bad implications to this...there must be a reason why the command shows up at the top of each file. > > Any thoughts? The point of changing the role to "replica" is that the log shipping node is a subscriber (albeit one that is separated), with the result that usually, triggers shouldn't fire. You're changing that role, in which case it is apropos for you to do as you're doing, to remove that GUC request. There's a further weird thing about this; by turning it into, effectively, a "master" node, you're doing a sort-of kind of multimaster replication. Not with the usual "holy grail" thing of being able to have updates propagate everywhere, but rather with the notion that... - A is the "first master", feeding downstream nodes like B and C. - C is a "sub-master", feeding downstream nodes like D, with the potential for there to be local changes made that would continue downstream. None of this is inherently necessarily terrible. The one thing I'd point out is that it'll be mighty difficult to validate that data is correct on D, as it captures changes both from upstream (A) as well as potentially having local changes introduced on C. "We don't make extra changes on C" is a good answer to that :-). -- let name="cbbrowne" and tld="ca.afilias.info" in String.concat "@" [name;tld];; Christopher Browne "Bother," said Pooh, "Eeyore, ready two photon torpedoes and lock phasers on the Heffalump, Piglet, meet me in transporter room three"
- Previous message: [Slony1-general] Monitoring using Nagios
- Next message: [Slony1-general] is it necessary to set session_replication_role in logshipper files?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-general mailing list