bucardo.git
11 years agoProper variable name
Greg Sabino Mullane [Sat, 21 Jun 2014 14:55:28 +0000 (10:55 -0400)]
Proper variable name

11 years agoSo it begins...version 5.0.0.
Greg Sabino Mullane [Fri, 20 Jun 2014 23:05:52 +0000 (19:05 -0400)]
So it begins...version 5.0.0.
(This time for sure)

11 years agoMinor release cleanups
Greg Sabino Mullane [Fri, 20 Jun 2014 17:26:19 +0000 (13:26 -0400)]
Minor release cleanups

11 years agoChange tests to reflect recent wording changes.
Greg Sabino Mullane [Thu, 19 Jun 2014 21:25:51 +0000 (17:25 -0400)]
Change tests to reflect recent wording changes.

11 years agoAdd a new lint test to detect hash names with spaces in them, to catch the mistake...
Greg Sabino Mullane [Thu, 19 Jun 2014 20:04:29 +0000 (16:04 -0400)]
Add a new lint test to detect hash names with spaces in them, to catch the mistake I made earlier.

11 years agoAny day now, but certainly not in 2013!t
Greg Sabino Mullane [Thu, 19 Jun 2014 16:29:27 +0000 (12:29 -0400)]
Any day now, but certainly not in 2013!t

11 years agoTypo!
Greg Sabino Mullane [Thu, 19 Jun 2014 15:16:36 +0000 (11:16 -0400)]
Typo!

11 years agoUse relgroup and dbgroup consistenly everywhere, rather than bouncing back and forth...
Greg Sabino Mullane [Thu, 19 Jun 2014 10:54:15 +0000 (06:54 -0400)]
Use relgroup and dbgroup consistenly everywhere, rather than bouncing back and forth between short and long forms.

11 years agoDon't clutter logs when a sync is paused and being kicked.
Greg Sabino Mullane [Wed, 18 Jun 2014 21:39:34 +0000 (17:39 -0400)]
Don't clutter logs when a sync is paused and being kicked.

11 years agoClean up some of the dependencies, get them in sync
Greg Sabino Mullane [Wed, 18 Jun 2014 13:48:49 +0000 (09:48 -0400)]
Clean up some of the dependencies, get them in sync

11 years agoTweak log_level output
Greg Sabino Mullane [Wed, 18 Jun 2014 13:41:33 +0000 (09:41 -0400)]
Tweak log_level output

11 years agoMake sure resumed syncs start out with a kick if needed
Greg Sabino Mullane [Wed, 18 Jun 2014 13:41:03 +0000 (09:41 -0400)]
Make sure resumed syncs start out with a kick if needed

11 years agoTabs to spaces
Greg Sabino Mullane [Wed, 18 Jun 2014 13:32:18 +0000 (09:32 -0400)]
Tabs to spaces

11 years agoOn install, switch to database postgres if our initial selection fails
Greg Sabino Mullane [Wed, 18 Jun 2014 13:30:57 +0000 (09:30 -0400)]
On install, switch to database postgres if our initial selection fails

11 years agoAllow dashes in usernames for install magic
Greg Sabino Mullane [Wed, 18 Jun 2014 13:28:58 +0000 (09:28 -0400)]
Allow dashes in usernames for install magic

11 years agoClean up wording on add_sync
Greg Sabino Mullane [Tue, 17 Jun 2014 13:15:37 +0000 (09:15 -0400)]
Clean up wording on add_sync

11 years agoTest cleanups
Greg Sabino Mullane [Sun, 15 Jun 2014 19:29:31 +0000 (15:29 -0400)]
Test cleanups

11 years agoAdjust tests for new add_database changes. Make sure that first db added to a new...
Greg Sabino Mullane [Sun, 15 Jun 2014 17:27:47 +0000 (13:27 -0400)]
Adjust tests for new add_database changes. Make sure that first db added to a new group is source, but if to an existing group, always target.

11 years agoNew makedelta plan: do not rely on ALWAYS triggers (too many side effects), but looku...
Greg Sabino Mullane [Sun, 15 Jun 2014 15:58:11 +0000 (11:58 -0400)]
New makedelta plan: do not rely on ALWAYS triggers (too many side effects), but lookup the other syncs and send messages to them manually.

11 years agoAdd some magic to transform raw "active" and "inactive" to status=$1
Greg Sabino Mullane [Sun, 15 Jun 2014 11:53:08 +0000 (07:53 -0400)]
Add some magic to transform raw "active" and "inactive" to status=$1

11 years agoFix up reload - the whole MCP if not args, else look for named syncs.
Greg Sabino Mullane [Sun, 15 Jun 2014 10:33:05 +0000 (06:33 -0400)]
Fix up reload - the whole MCP if not args, else look for named syncs.

11 years agoSkip the 'extra args' when doing an update_database
Greg Sabino Mullane [Sun, 15 Jun 2014 10:28:23 +0000 (06:28 -0400)]
Skip the 'extra args' when doing an update_database

11 years agoWhen grabbing the last modification time for all tables in conflict resolution, make...
Greg Sabino Mullane [Sat, 14 Jun 2014 23:33:30 +0000 (19:33 -0400)]
When grabbing the last modification time for all tables in conflict resolution, make sure we shove NULLs to the bottom!

11 years agoAllow syncs to be paused and resumed via command line.
Greg Sabino Mullane [Sat, 14 Jun 2014 17:54:53 +0000 (13:54 -0400)]
Allow syncs to be paused and resumed via command line.

11 years agoDo not allow syncs to be named "sync"
Greg Sabino Mullane [Sat, 14 Jun 2014 16:41:16 +0000 (12:41 -0400)]
Do not allow syncs to be named "sync"

11 years agoFix incorrect table gathering
Greg Sabino Mullane [Sat, 14 Jun 2014 12:45:36 +0000 (08:45 -0400)]
Fix incorrect table gathering

11 years agoAllow 'bucardo stop' to work if piddir is set (and if database is not reachable)
Greg Sabino Mullane [Fri, 13 Jun 2014 17:36:59 +0000 (13:36 -0400)]
Allow 'bucardo stop' to work if piddir is set (and if database is not reachable)

11 years agoAllow :s and :t as valid shortcuts when specifying roles for a database
Greg Sabino Mullane [Fri, 13 Jun 2014 11:03:48 +0000 (07:03 -0400)]
Allow :s and :t as valid shortcuts when specifying roles for a database

11 years agoDo not show connction failure message on install if we are trying a different user.
Greg Sabino Mullane [Fri, 13 Jun 2014 11:02:53 +0000 (07:02 -0400)]
Do not show connction failure message on install if we are trying a different user.
If the postgres user fails on install, try ENV{USER} - even in batch mode.

11 years agoWhen adding all tables, make sure we truly find the best db (previous check was not...
Greg Sabino Mullane [Fri, 13 Jun 2014 11:01:31 +0000 (07:01 -0400)]
When adding all tables, make sure we truly find the best db (previous check was not enough, as dbcols->{db} was often undef but existed)

11 years agoAllow the role to be specified when adding dbgroups from command line during 'bucardo...
Greg Sabino Mullane [Fri, 13 Jun 2014 11:00:33 +0000 (07:00 -0400)]
Allow the role to be specified when adding dbgroups from command line during 'bucardo add database'

11 years agoRemove duplicated arg
Greg Sabino Mullane [Fri, 13 Jun 2014 10:54:07 +0000 (06:54 -0400)]
Remove duplicated arg

11 years agoDo not default to user 'bucardo' on install
Greg Sabino Mullane [Fri, 13 Jun 2014 10:43:25 +0000 (06:43 -0400)]
Do not default to user 'bucardo' on install

11 years agoAllow the piddir to be overidden at the bucardorc level
Greg Sabino Mullane [Thu, 12 Jun 2014 16:04:42 +0000 (12:04 -0400)]
Allow the piddir to be overidden at the bucardorc level

11 years agoFix up customcode for conflict handlers
Greg Sabino Mullane [Wed, 11 Jun 2014 13:58:50 +0000 (09:58 -0400)]
Fix up customcode for conflict handlers

11 years agoAllow syncs to be updates with just 'active' or 'inactive' as shortcuts for status=xxx
Greg Sabino Mullane [Wed, 11 Jun 2014 13:58:11 +0000 (09:58 -0400)]
Allow syncs to be updates with just 'active' or 'inactive' as shortcuts for status=xxx

11 years agoAllow update customcode to change the source code
Greg Sabino Mullane [Wed, 11 Jun 2014 13:56:30 +0000 (09:56 -0400)]
Allow update customcode to change the source code

11 years agoMinor fixes to bucardo script
Greg Sabino Mullane [Wed, 11 Jun 2014 13:55:48 +0000 (09:55 -0400)]
Minor fixes to bucardo script

11 years agoOn startup, go ahead and charge forward if the PID in the mcp pid file seems invalid...
Greg Sabino Mullane [Wed, 11 Jun 2014 13:53:04 +0000 (09:53 -0400)]
On startup, go ahead and charge forward if the PID in the mcp pid file seems invalid - and remove that file as well.
Per github issue #80

11 years agoAdjust the makedelta tests
Greg Sabino Mullane [Tue, 10 Jun 2014 16:30:10 +0000 (12:30 -0400)]
Adjust the makedelta tests

11 years agoClean up makedelta system a bit
Greg Sabino Mullane [Tue, 10 Jun 2014 11:50:31 +0000 (07:50 -0400)]
Clean up makedelta system a bit

11 years agoChange the per-sync isolation level default to match the global one: repeatable read...
Greg Sabino Mullane [Mon, 9 Jun 2014 15:55:20 +0000 (11:55 -0400)]
Change the per-sync isolation level default to match the global one: repeatable read. Serializable was simply causing too many problems in the tests, and is most likely overkill considering the usual workload of DELETE/COPY.

11 years agoPrevent autovivification of an important hash.
Greg Sabino Mullane [Mon, 9 Jun 2014 11:51:34 +0000 (07:51 -0400)]
Prevent autovivification of an important hash.
This was causing too many updates to the trigger tracking table.
Should clear up recurring serialization errors seen.

11 years agoMinor formatting cleanups
Greg Sabino Mullane [Sun, 8 Jun 2014 17:15:05 +0000 (13:15 -0400)]
Minor formatting cleanups

11 years agoTweak test for new output format
Greg Sabino Mullane [Sun, 8 Jun 2014 12:44:27 +0000 (08:44 -0400)]
Tweak test for new output format

11 years agoOnly assume database being added to a group is source if we have more than one db...
Greg Sabino Mullane [Sun, 8 Jun 2014 12:43:21 +0000 (08:43 -0400)]
Only assume database being added to a group is source if we have more than one db being added at once

11 years agoMake sure we turn off confirm_commit when testing
Greg Sabino Mullane [Sun, 8 Jun 2014 00:06:24 +0000 (20:06 -0400)]
Make sure we turn off confirm_commit when testing

11 years agoTabs again.
Greg Sabino Mullane [Sat, 7 Jun 2014 21:09:00 +0000 (17:09 -0400)]
Tabs again.

11 years agoadd_sync: fix checking for existing dbgroup; add back in confirm_commit
Greg Sabino Mullane [Sat, 7 Jun 2014 19:36:55 +0000 (15:36 -0400)]
add_sync: fix checking for existing dbgroup; add back in confirm_commit

11 years agoMake tables=all (e.g. for add_sync) add only tables with pkeys or unique indexes...
Greg Sabino Mullane [Sat, 7 Jun 2014 19:32:14 +0000 (15:32 -0400)]
Make tables=all (e.g. for add_sync) add only tables with pkeys or unique indexes; also excludes the bucardo schema.

11 years agoUse savepoints when removing databases, in case we need to use the evals
Greg Sabino Mullane [Sat, 7 Jun 2014 18:58:55 +0000 (14:58 -0400)]
Use savepoints when removing databases, in case we need to use the evals

11 years agoAdd new ENV BUCARDO_CONFIRM which sets bcargs->{confirm} inside of the bucardo program.
Greg Sabino Mullane [Sat, 7 Jun 2014 18:43:20 +0000 (14:43 -0400)]
Add new ENV  BUCARDO_CONFIRM which sets bcargs->{confirm} inside of the bucardo program.

11 years agoMild doc updates
Greg Sabino Mullane [Sat, 7 Jun 2014 18:37:10 +0000 (14:37 -0400)]
Mild doc updates

11 years agoUse smallint, integer, and bigint rather than int[248] for the column types in the...
Greg Sabino Mullane [Sat, 7 Jun 2014 18:29:27 +0000 (14:29 -0400)]
Use smallint, integer, and bigint rather than int[248] for the column types in the goat table.

11 years agoAllow add_database to take more than one arg so we can add multiple databases at...
Greg Sabino Mullane [Sat, 7 Jun 2014 15:10:44 +0000 (11:10 -0400)]
Allow add_database to take more than one arg so we can add multiple databases at once via command line

11 years agoAllow the 'dbs' argument to specify a dbgroup when doing "add_sync", for backwards...
Greg Sabino Mullane [Fri, 6 Jun 2014 22:32:12 +0000 (18:32 -0400)]
Allow the 'dbs' argument to specify a dbgroup when doing "add_sync", for backwards compatibility.

11 years agoRemove few instances of trailing whitespace
Greg Sabino Mullane [Fri, 6 Jun 2014 19:51:11 +0000 (15:51 -0400)]
Remove few instances of trailing whitespace

11 years agoTrailing whitespace check for Bucardo.pm too
Greg Sabino Mullane [Fri, 6 Jun 2014 19:50:56 +0000 (15:50 -0400)]
Trailing whitespace check for Bucardo.pm too

11 years agoQuick trailing whitespace testing
Greg Sabino Mullane [Fri, 6 Jun 2014 19:47:59 +0000 (15:47 -0400)]
Quick trailing whitespace testing

11 years agoMake add_sync much smarter and clearer. Should now be able to add dbgroups, dbs,...
Greg Sabino Mullane [Fri, 6 Jun 2014 19:47:21 +0000 (15:47 -0400)]
Make add_sync much smarter and clearer. Should now be able to add dbgroups, dbs, tables, and relgroups more intuitively.

11 years agoUse -l to check for a symlink.
David E. Wheeler [Tue, 3 Jun 2014 21:22:36 +0000 (14:22 -0700)]
Use -l to check for a symlink.

Not -s. From [-X.pod](http://perldoc.perl.org/functions/-X.html):

    -s  File has nonzero size (returns size in bytes).
    -l  File is a symbolic link.

Bug introduced in 9a1c0dbf.

11 years agoAllow args to use : or = as delimiters.
Greg Sabino Mullane [Sun, 1 Jun 2014 22:07:48 +0000 (18:07 -0400)]
Allow args to use : or = as delimiters.
Allow more aliases for tables in add sync calls.

11 years agoSet the log prefix immediately after forking, based on the passed-in type
Greg Sabino Mullane [Sun, 1 Jun 2014 20:34:09 +0000 (16:34 -0400)]
Set the log prefix immediately after forking, based on the passed-in type

11 years agoSpellcheck and linty cleanups
Greg Sabino Mullane [Sat, 31 May 2014 18:38:43 +0000 (14:38 -0400)]
Spellcheck and linty cleanups

11 years agoMake sure we import our methods!
Greg Sabino Mullane [Sat, 31 May 2014 12:34:54 +0000 (08:34 -0400)]
Make sure we import our methods!

11 years agoTabs to spaces
Greg Sabino Mullane [Sat, 31 May 2014 12:30:07 +0000 (08:30 -0400)]
Tabs to spaces

11 years agoDo not like Encode::Locale dependency, but since it is here, might as well use its...
Greg Sabino Mullane [Sat, 31 May 2014 12:28:55 +0000 (08:28 -0400)]
Do not like Encode::Locale dependency, but since it is here, might as well use its method for argv decoding.

11 years agoChange wording in examples as we use target, not slave. Not even sure the commented...
Greg Sabino Mullane [Thu, 29 May 2014 18:26:38 +0000 (14:26 -0400)]
Change wording in examples as we use target, not slave. Not even sure the commented examples in bucardo are valid anymore!

11 years agoTweak some redo logic
Greg Sabino Mullane [Wed, 28 May 2014 20:30:58 +0000 (16:30 -0400)]
Tweak some redo logic

11 years agoWe need target column on index to be text_pattern_ops, as we are going to start looki...
Greg Sabino Mullane [Sun, 25 May 2014 20:17:24 +0000 (16:17 -0400)]
We need target column on index to be text_pattern_ops, as we are going to start looking for partials.

11 years agoSomeone fix this test, please.
Greg Sabino Mullane [Sun, 25 May 2014 19:58:30 +0000 (15:58 -0400)]
Someone fix this test, please.

11 years agoNo more ^T: in the main distinct delta gathering clause: there will be a new way...
Greg Sabino Mullane [Sat, 24 May 2014 16:46:41 +0000 (12:46 -0400)]
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.

11 years agoFirst swing at handling dead databases in a smooth manner.
Greg Sabino Mullane [Fri, 23 May 2014 14:40:05 +0000 (10:40 -0400)]
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

11 years agoDo a check for a stopfile after MCP sleeps. Prevents infinite loop if something goes...
Greg Sabino Mullane [Thu, 22 May 2014 16:00:29 +0000 (12:00 -0400)]
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.

11 years agoMinor fixes
Greg Sabino Mullane [Tue, 20 May 2014 15:11:32 +0000 (11:11 -0400)]
Minor fixes

11 years agoAdd support for "bucardo reopen" command, which will cause all processes to re-open...
Greg Sabino Mullane [Mon, 19 May 2014 17:38:49 +0000 (13:38 -0400)]
Add support for "bucardo reopen" command, which will cause all processes to re-open any existing file handles.
Useful for log rotations.

11 years agoFramework for new 'reopen' command
Greg Sabino Mullane [Fri, 16 May 2014 16:13:35 +0000 (12:13 -0400)]
Framework for new 'reopen' command

11 years agoPrint the last git commit information on startup
Greg Sabino Mullane [Wed, 7 May 2014 16:58:37 +0000 (12:58 -0400)]
Print the last git commit information on startup

11 years agoDon't try to use pg_cancel if things blew up, simply rollback and set async_active...
Greg Sabino Mullane [Wed, 7 May 2014 15:50:41 +0000 (11:50 -0400)]
Don't try to use pg_cancel if things blew up, simply rollback and set async_active off!

11 years agoMake sure we only update bucardo_truncate_trigger if we really need to, per report...
Greg Sabino Mullane [Mon, 5 May 2014 14:29:03 +0000 (10:29 -0400)]
Make sure we only update bucardo_truncate_trigger if we really need to, per report of severe bloat on the mailing list.

11 years agoPrevent uninitialized warnings from no db.service on validate, per mailing list compl...
Greg Sabino Mullane [Mon, 5 May 2014 14:24:42 +0000 (10:24 -0400)]
Prevent uninitialized warnings from no db.service on validate, per mailing list complaint.

11 years agoRename the somewhat confusing bucardo version configuration variables.
Greg Sabino Mullane [Mon, 5 May 2014 14:19:46 +0000 (10:19 -0400)]
Rename the somewhat confusing bucardo version configuration variables.
bucardo_version becomes bucardo_initial_version
bucardo_current_version becomes bucardo_version

11 years agoMild TODO cleanup
Greg Sabino Mullane [Mon, 5 May 2014 14:19:27 +0000 (10:19 -0400)]
Mild TODO cleanup

11 years agoNo sense it sending notification if the db is down
Greg Sabino Mullane [Sun, 4 May 2014 14:24:53 +0000 (10:24 -0400)]
No sense it sending notification if the db is down

11 years agoMore tweaking to async code
Greg Sabino Mullane [Fri, 2 May 2014 23:34:44 +0000 (19:34 -0400)]
More tweaking to async code

11 years agoRandom comments about new plan
Greg Sabino Mullane [Fri, 2 May 2014 22:07:35 +0000 (18:07 -0400)]
Random comments about new plan

11 years agoFix typo
Greg Sabino Mullane [Wed, 30 Apr 2014 11:27:41 +0000 (07:27 -0400)]
Fix typo

11 years agoDebugging to solve pg_result errors.
Greg Sabino Mullane [Tue, 29 Apr 2014 22:39:42 +0000 (18:39 -0400)]
Debugging to solve pg_result errors.

11 years agoGrabbed incorrect hash - was causing the async_status to not get checked and cleared...
Greg Sabino Mullane [Tue, 29 Apr 2014 18:10:30 +0000 (14:10 -0400)]
Grabbed incorrect hash - was causing the async_status to not get checked and cleared properly on serialization failures occuring at the pg_result point. Shoudl clear up the recent problem seen on the mailing list.

11 years agoSig for 4.99.12
Greg Sabino Mullane [Fri, 25 Apr 2014 17:25:07 +0000 (13:25 -0400)]
Sig for 4.99.12

11 years agoBump version to 4.99.12 4.99.12
Greg Sabino Mullane [Fri, 25 Apr 2014 17:23:10 +0000 (13:23 -0400)]
Bump version to 4.99.12

11 years agoBetter tracking of async status
Greg Sabino Mullane [Thu, 24 Apr 2014 00:07:04 +0000 (20:07 -0400)]
Better tracking of async status

11 years agoBetter service arg parsing
Greg Sabino Mullane [Sun, 20 Apr 2014 12:23:59 +0000 (08:23 -0400)]
Better service arg parsing

11 years agoreadlink can sometimes retrurn undef, even if -s is true, so make a safety check
Greg Sabino Mullane [Sun, 20 Apr 2014 11:29:22 +0000 (07:29 -0400)]
readlink can sometimes retrurn undef, even if -s is true, so make a safety check

11 years agoMild tweaks to log_level notifications
Greg Sabino Mullane [Tue, 15 Apr 2014 15:02:23 +0000 (11:02 -0400)]
Mild tweaks to log_level notifications

11 years agoSupport symlinked bucardo executable when looking for Bucardo.pm and bucardo.schema
Greg Sabino Mullane [Tue, 15 Apr 2014 15:01:24 +0000 (11:01 -0400)]
Support symlinked bucardo executable when looking for Bucardo.pm and bucardo.schema
Allow use of "all" and "tables=all" when creating a herd/relgroup
Don't keep retrying connection if in batch mode

11 years agosqlite: do a BEGIN EXCLUSIVE TRANSACTION in force-lock mode.
Greg Sabino Mullane [Sat, 12 Apr 2014 18:33:50 +0000 (14:33 -0400)]
sqlite: do a BEGIN EXCLUSIVE TRANSACTION in force-lock mode.

11 years agoPut the force-lock-file in the piddir, rather than the globally writeable /tmp
Greg Sabino Mullane [Sat, 12 Apr 2014 18:25:42 +0000 (14:25 -0400)]
Put the force-lock-file in the piddir, rather than the globally writeable /tmp

11 years agoTake out the session level isolation level for mysql - our per transaction calls...
Greg Sabino Mullane [Sat, 12 Apr 2014 17:58:52 +0000 (13:58 -0400)]
Take out the session level isolation level for mysql - our per transaction calls should be good enough.

11 years agoUse READ WRITE isolation levels wherever we can.
Greg Sabino Mullane [Sat, 12 Apr 2014 17:50:57 +0000 (13:50 -0400)]
Use READ WRITE isolation levels wherever we can.