On 12/1/2008 6:21 PM, Troy Wolf wrote:
First, a question that I know has been asked before, but after
grepping and perusing months of the maillist archives, I did not find
the answer: Why is it required to use a Subscriber to generate log
files? Why can't the Origin slon process be started with the option to
generate logs? It just so happens that in my case, I have an Origin
and a normal Subscriber and a third node that I replicate via Log
Shipping. However, I imagine lots of people would have a need for a
single Origin and a single, WAN-connected node they want to replicate
via Log Shipping.
And now onto the issue at hand...
PostgreSQL 8.2 on SUSE ES 10
Slony1-1.2.12
The documentation at http://slony.info/documentation/logshipping.html states:
----------------------------------------------------------------------------------------------------------------------------
14.2. What takes place when a FAILOVER/ MOVE SET takes place?
Nothing special. So long as the archiving node remains a subscriber,
it will continue to generate logs.
If the archiving node becomes the origin, on the other hand, it will
continue to generate logs.
----------------------------------------------------------------------------------------------------------------------------
Hmmm..."If the archiving node becomes the origin, on the other hand,
it will continue to generate logs.". Yes, indeed, it continues to
generate logs. Unfortunately, the logs do not include any of the
changes applied to the new Origin!
Well, it certainly is a bug that it continues to generate logs ... we
will see to fix it and stop it from creating useless files.
The reason is the same as for not being able to create such a setup in
the first place. Log shipping is implemented as a byproduct of the
normal replication process done by a subscriber. That includes keeping
track of what has been replicated thus far. If you want an origin to
generate the log, it would need another thread, eventually kicked off by
the sync thread, that queries its own database the same way an actual
subscriber does and keeps track of what has been written locally.
It could of course be implemented this way, but so far nobody had
"enough" need for it to provide a patch that implements it.
Jan
We are currently building a test system to reproduce this behaviour,
but twice now, we've seen that when we performed a Switchover--that is
swapped roles between our Origin and Subscriber so the node that was
the Subscriber and also the node that generates the log files is now
the Origin--the updates to the new Origin do not make it into the log
files. The log files keep generating just dandy, but they only contain
the normal Slony-generated shell (the transaction start and commit,
etc.) and none of the actual SQL modifications.
Note that the node that had previously been the Origin that is now the
normal Subscriber does get the updates. That is, the normal Slony
replication is working. Only Log Shipping has broken after the
Switchover.
BUG? Solved in a post 1.2.12 version?
Thank you,
Troy
_______________________________________________
Slony1-general mailing list
[email protected]
http://lists.slony.info/mailman/listinfo/slony1-general
--
Anyone who trades liberty for security deserves neither
liberty nor security. -- Benjamin Franklin
_______________________________________________
Slony1-general mailing list
[email protected]
http://lists.slony.info/mailman/listinfo/slony1-general