Framework for new 'reopen' command
Add support for "bucardo reopen" command, which will cause all processes to re-open any existing file handles.
Useful for log rotations.
Minor fixes
Do a check for a stopfile after MCP sleeps. Prevents infinite loop if something goes wrong before the MCP can spin up all the way.
First swing at handling dead databases in a smooth manner.
If a database is unreachable, we mark it as stalled. The sync containing it is marked as stalled as well.
This should allow other syncs to continue even if databases from another sync are down.
We also re-check stalled databases on startup and restore things to an active state if we can.
Still todo:
* tests
* handle other dbi databases
* handle non-dbi databases
* have mcp periodically check if we can restore stalled dbs/syncs.
* cleanup/refactor the code
No more ^T: in the main distinct delta gathering clause: there will be a new way to do things, linked to the new partial sync system.
Someone fix this test, please.
We need target column on index to be text_pattern_ops, as we are going to start looking for partials.