Greg Sabino Mullane [Thu, 24 Oct 2013 03:35:29 +0000 (23:35 -0400)]
Replace 'haztrig' with cached version inside of validate_sync.
Greg Sabino Mullane [Thu, 24 Oct 2013 02:38:56 +0000 (22:38 -0400)]
Show the DSN we are connecting with
Greg Sabino Mullane [Wed, 23 Oct 2013 14:58:49 +0000 (10:58 -0400)]
Report on total sync time in the logs, even if no rows were changed.
Greg Sabino Mullane [Wed, 23 Oct 2013 03:38:26 +0000 (23:38 -0400)]
Only try and create that index once.
Greg Sabino Mullane [Wed, 23 Oct 2013 03:29:22 +0000 (23:29 -0400)]
Speed up the initial validate sync quite a bit by pre-loading all the table, index, and function existence information.
Greg Sabino Mullane [Wed, 23 Oct 2013 02:16:06 +0000 (22:16 -0400)]
No longer use the whole prefix when building the listen/notify strings, as it may contain a syncname now.
Greg Sabino Mullane [Sun, 20 Oct 2013 02:10:32 +0000 (22:10 -0400)]
When doing `bucardo list databases`, don't show the psql port connection param unless it is set to something.
Greg Sabino Mullane [Sat, 19 Oct 2013 01:41:56 +0000 (21:41 -0400)]
Fix wrong search before inserting to bucardo_delta_targets.
This would explain the large number of rows seen in that table in the wild!
Greg Sabino Mullane [Fri, 18 Oct 2013 04:12:02 +0000 (00:12 -0400)]
Expand the arrays in the opening config dump in the logs.
Greg Sabino Mullane [Fri, 18 Oct 2013 03:41:20 +0000 (23:41 -0400)]
Enforce sane isolation levels
Greg Sabino Mullane [Fri, 18 Oct 2013 02:42:28 +0000 (22:42 -0400)]
Add new config 'log_showsyncname', defaulting to 1 (on), which will show the name of the current sync in parens after the 'KID' in the log output.
So rather than this:
(29985) [Thu Oct 17 22:40:12.885 2013] KID Database "A" backend PID: 29987
You will see this:
(29985) [Thu Oct 17 22:40:12.885 2013] KID (fctest) Database "A" backend PID: 29987
As suggested by Michelle Sullivan on the mailing list.
Greg Sabino Mullane [Fri, 18 Oct 2013 02:30:52 +0000 (22:30 -0400)]
Typo.
Greg Sabino Mullane [Thu, 17 Oct 2013 03:12:42 +0000 (23:12 -0400)]
Update versions in html docs
Greg Sabino Mullane [Thu, 17 Oct 2013 03:10:44 +0000 (23:10 -0400)]
Fix some pod
Greg Sabino Mullane [Thu, 17 Oct 2013 02:59:57 +0000 (22:59 -0400)]
Don't remember why this was here, but mark it as LOG_DEBUG
Greg Sabino Mullane [Thu, 17 Oct 2013 02:58:51 +0000 (22:58 -0400)]
Away with ye, tab
David E. Wheeler [Wed, 16 Oct 2013 21:25:07 +0000 (14:25 -0700)]
Set version to 4.99.8.
David E. Wheeler [Wed, 16 Oct 2013 20:39:09 +0000 (13:39 -0700)]
Try harder to collect and emit errors on validation failures.
There's no need to wait for a NOTIFY, as `validate_sync()` runs synchronously.
So just check the return value for errors, and use excpetion handling to catch
other kinds of errors. This allows us to catch and emit all errors and also
allow execution to finish validating all syncs (should it be validating
multiples). Closes #65.
David E. Wheeler [Tue, 15 Oct 2013 23:35:57 +0000 (16:35 -0700)]
Improve the auto-creation of the "bucardo" role.
When adding a database, that is. The old code led to confusing errors, where
the user would be told that Bucardo failed to connect as user "postgres" when
you had not, in fact, asked it to. So log more informat as it goes along,
noting failure to connect as "bucardo", trying to connect as "postgres", and
showing success or failure at doing so. This makes things much clearer to the
user what's going on -- and is less fussy, to boot.
Resolves #63.
Greg Sabino Mullane [Tue, 15 Oct 2013 00:56:56 +0000 (20:56 -0400)]
More bypassing of track_rates
Greg Sabino Mullane [Tue, 15 Oct 2013 00:55:05 +0000 (20:55 -0400)]
Skip the not-working-now track_rates section.
Joshua Tolley [Mon, 14 Oct 2013 14:52:23 +0000 (08:52 -0600)]
Merge in patch to ensure objects from different databases but having the same
names are treated distinctly.
David E. Wheeler [Mon, 7 Oct 2013 18:45:39 +0000 (11:45 -0700)]
Log verbose instead of debug.
For serialization and deadlock failures.
David E. Wheeler [Mon, 7 Oct 2013 16:56:06 +0000 (09:56 -0700)]
Log loglevel as a string.
David E. Wheeler [Mon, 7 Oct 2013 16:23:07 +0000 (09:23 -0700)]
Make it clearer which handles to log.
David E. Wheeler [Mon, 7 Oct 2013 16:21:55 +0000 (09:21 -0700)]
Topic, not lexical.
David E. Wheeler [Mon, 7 Oct 2013 16:20:29 +0000 (09:20 -0700)]
Log only errors.
Greg Sabino Mullane [Sat, 5 Oct 2013 01:19:27 +0000 (21:19 -0400)]
Try harder to find initdb when testing.
Greg Sabino Mullane [Sat, 5 Oct 2013 01:19:03 +0000 (21:19 -0400)]
Add some text fields to the dbgroup and herd tables for future use in "cloning"
Greg Sabino Mullane [Fri, 4 Oct 2013 14:30:44 +0000 (10:30 -0400)]
Make the inactivate sub a bit smarter. May fix the recurring doublefree/coredump VAC issue.
David E. Wheeler [Wed, 2 Oct 2013 23:43:27 +0000 (16:43 -0700)]
Fix inaccurate comment.
David E. Wheeler [Wed, 2 Oct 2013 22:34:22 +0000 (15:34 -0700)]
Changing a sync status does not load or unload it.
So document that fact. We may or may not want to change this in the future.
Ref #55.
David E. Wheeler [Wed, 2 Oct 2013 22:29:07 +0000 (15:29 -0700)]
Update sync status on activate/deactivate.
Resolves #55.
David E. Wheeler [Wed, 2 Oct 2013 21:57:50 +0000 (14:57 -0700)]
Document strict_checking for tables, too.
Allow it to be passed to `add table` as well as `update table`.
Ref #57.
David E. Wheeler [Wed, 2 Oct 2013 21:51:23 +0000 (14:51 -0700)]
Document strict_checking and add it to `add sync`.
Resolves #57.
David E. Wheeler [Wed, 2 Oct 2013 18:41:07 +0000 (11:41 -0700)]
Add the reload_config_timeout config.
And put it to use in the reload_config command. Also provide more context in
the error message when it does timeout. Closes #67.
David E. Wheeler [Wed, 2 Oct 2013 18:25:34 +0000 (11:25 -0700)]
Change default reload_config timeout to 30s.
Ref #67.
David E. Wheeler [Wed, 2 Oct 2013 16:25:39 +0000 (09:25 -0700)]
Purge unknown tables from bucardo_delta_targets.
They seem to get left behind when a table is dropped. Maybe other reasons,
I honestly don't know.
Greg Sabino Mullane [Wed, 11 Sep 2013 15:41:27 +0000 (11:41 -0400)]
Don't show serialize/deadlock errors unless we are LOG_VERBOSE, per mailing list discussion.
Greg Sabino Mullane [Thu, 29 Aug 2013 02:45:55 +0000 (22:45 -0400)]
Switch time zone to GMT, as we did in Bucardo4
David E. Wheeler [Thu, 25 Jul 2013 15:33:03 +0000 (17:33 +0200)]
In `status`, if last run is "empty", call it "good".
Two reasons for this:
* An empty run is not a failure, but "Empty" is kind of distracting
in the output.
* It is useful, if you just kicked a sync, to see that it ran in the output of
`status`, even if it was empty.
David E. Wheeler [Thu, 25 Jul 2013 14:57:54 +0000 (16:57 +0200)]
State can also be "Unknown".
Though I am not sure how it gets in that state...
David E. Wheeler [Thu, 25 Jul 2013 14:55:16 +0000 (16:55 +0200)]
Note state value for currently-running sync.
David E. Wheeler [Thu, 25 Jul 2013 14:40:05 +0000 (16:40 +0200)]
End syncs on deadlock and serialization failure.
When I added the serialization failure-handling code, I neglected to notice
that it left orphaned `syncrun` rows with no `ended` value. This confused
later syncruns -- like the one that would run after the 0.5s sleep after a
serialization failure. The code was rolling back the main (Bucardo) database
connection, but the syncrun was already committed elsewhere (so that other
processes could see that a sync is in progress, of course; duh!).
So modify the code to instead call `end_syncrun()` and declare the sync
failed, but, of course, with a status recording the seriazliation failure or
deadlock.
David E. Wheeler [Wed, 24 Jul 2013 17:45:50 +0000 (19:45 +0200)]
Listen for autokicks on sources for the sync, not all sources.
I had a database in two dbgroups (and syncs), once as a target and once as a
source. On startup, `validate_sync()` was processing the sync where it was a
target, first, and that was the role saved for it in `$self->{sdb}`. Then,
when `validate_sync()` iterated over `$self->{sdb}`, it thought it was a role,
and so did not have the MCP listen for kicks.
Not only that, but sources from other, previously-validated syncs were
unnecessarily listening for kicks!
So change the code to iterate over the list of DBs for the current call to
`validate_sync()`, not all dbs for all syncs, when figuring out whereq to listen
to for kicks.
Note that the use of the same db object in multiple db groups and syncs *may*
cause issues in other places. It would be smart to audit all code that checks
the value in `{role}` for each hash in `$self->{sdb}` and figure out if it is
appropriate. Since the same db can have different roles in differnt syncs, it
might make sense to record all of its roles and to check all of them, rather
than just rely on the first role found.
David E. Wheeler [Wed, 24 Jul 2013 17:23:16 +0000 (19:23 +0200)]
Revert "Make kick triggers consistently use the non-payload version."
This reverts commit
25973f4b5ba797568467632b79e8129ffe007f49. I'm pretty sure
this was not the problem, since I have syncs that *do* work with this
approach.
The problem I'm having with a NOTIFY being ignored is that the database in
question is used in two db groups, once as a source, another as a target. As
it validates, it finds the target record before the source, and stores that
one away. Then the autokick is ignored, because Bucardo thinks the DB is a
target, not a source. Working on a fix for that now.
David E. Wheeler [Wed, 24 Jul 2013 16:16:22 +0000 (18:16 +0200)]
Check for empty state, too.
David E. Wheeler [Wed, 24 Jul 2013 16:16:04 +0000 (18:16 +0200)]
Remove listen_payload in unlisten_all().
David E. Wheeler [Wed, 24 Jul 2013 16:15:44 +0000 (18:15 +0200)]
Add daemon role to application name.
Greg Sabino Mullane [Wed, 24 Jul 2013 14:46:47 +0000 (10:46 -0400)]
Make kick triggers consistently use the non-payload version.
May want to have MCP be able to recognize both versions for backwards compat.
David E. Wheeler [Tue, 23 Jul 2013 22:46:14 +0000 (00:46 +0200)]
Fix `reload config` timeout.
First, allow `reload config 30` to work. Resolves #66.
Second, actually *capture* the timeout and wait that long, instead of just
five seconds every time.
Greg Sabino Mullane [Thu, 18 Jul 2013 02:48:37 +0000 (22:48 -0400)]
Remove comment line about spacing - no longer applies.
Greg Sabino Mullane [Thu, 18 Jul 2013 02:44:45 +0000 (22:44 -0400)]
Make sure "bucardo help" doesn't try to connect to a database. Per github issue #64
Greg Sabino Mullane [Mon, 1 Jul 2013 16:00:43 +0000 (12:00 -0400)]
Bump the version to 5.0.0.
Greg Sabino Mullane [Fri, 28 Jun 2013 17:06:59 +0000 (13:06 -0400)]
Switch default isolation level back to repeatable read
Greg Sabino Mullane [Fri, 21 Jun 2013 03:40:29 +0000 (23:40 -0400)]
Match process name case-insensitive
Greg Sabino Mullane [Fri, 21 Jun 2013 02:33:01 +0000 (22:33 -0400)]
Proper debug for isolation levels
Greg Sabino Mullane [Mon, 17 Jun 2013 03:45:11 +0000 (23:45 -0400)]
Fixes for upgrade magic
Greg Sabino Mullane [Wed, 29 May 2013 17:15:28 +0000 (13:15 -0400)]
Let's do github canonically
Greg Sabino Mullane [Mon, 27 May 2013 12:26:04 +0000 (08:26 -0400)]
Move some things from bugzilla to here
Greg Sabino Mullane [Sat, 18 May 2013 04:43:18 +0000 (00:43 -0400)]
Super minor tweak
Greg Sabino Mullane [Sat, 4 May 2013 15:19:28 +0000 (11:19 -0400)]
VAC handle pg_listener, per list discussion
Joshua Tolley [Wed, 24 Apr 2013 15:15:18 +0000 (09:15 -0600)]
This should have gone in with the last commit, as well
Joshua Tolley [Wed, 24 Apr 2013 15:14:48 +0000 (09:14 -0600)]
Improve output, and update tests accordingly
Joshua Tolley [Tue, 23 Apr 2013 16:09:35 +0000 (10:09 -0600)]
Add a bit more output to identify a database
Joshua Tolley [Tue, 23 Apr 2013 16:06:00 +0000 (10:06 -0600)]
Add tests and code for update table db filtering
Joshua Tolley [Tue, 23 Apr 2013 15:51:25 +0000 (09:51 -0600)]
Clean up lots, and get list table working better
Joshua Tolley [Tue, 23 Apr 2013 15:46:16 +0000 (09:46 -0600)]
Clean up tests
Joshua Tolley [Mon, 22 Apr 2013 22:11:59 +0000 (16:11 -0600)]
Merge branch 'master' of ssh://bucardo.org/var/lib/git/bucardo into database-specific-names
Joshua Tolley [Mon, 22 Apr 2013 22:11:25 +0000 (16:11 -0600)]
Fix customcols; all preexisting tests pass
Joshua Tolley [Mon, 22 Apr 2013 21:50:08 +0000 (15:50 -0600)]
even more tests work now
Joshua Tolley [Mon, 22 Apr 2013 19:49:07 +0000 (13:49 -0600)]
Fix herd adding logic, with caveats noted in test source
Joshua Tolley [Mon, 22 Apr 2013 16:01:20 +0000 (10:01 -0600)]
Consolidate methods for finding goats
Greg Sabino Mullane [Wed, 17 Apr 2013 16:03:17 +0000 (12:03 -0400)]
Allow for auto reconnection of databases for crash testing.
Joshua Tolley [Wed, 17 Apr 2013 15:35:25 +0000 (09:35 -0600)]
Typo
Joshua Tolley [Tue, 16 Apr 2013 20:16:53 +0000 (14:16 -0600)]
Merge from master
Joshua Tolley [Tue, 16 Apr 2013 20:14:38 +0000 (14:14 -0600)]
02-bctl-herd.t passes
Mitchell Perilstein [Wed, 27 Mar 2013 17:51:43 +0000 (13:51 -0400)]
The regex looking at ps output when killing children didn't match the children
Mitchell Perilstein [Fri, 29 Mar 2013 18:57:36 +0000 (14:57 -0400)]
Avoid warning if no $HOME.
Joshua Tolley [Tue, 16 Apr 2013 19:16:51 +0000 (13:16 -0600)]
Incremental progress
Refactored %GOAT, and several functions that refer to it
Added beginnings of a new test file
This doesn't work yet, but needs to live somewhere other than just my computer.
Greg Sabino Mullane [Fri, 12 Apr 2013 02:50:22 +0000 (22:50 -0400)]
Show correct error
Joshua Tolley [Fri, 29 Mar 2013 16:18:55 +0000 (10:18 -0600)]
Add more explicit support for adding and removing sequences
Greg Sabino Mullane [Wed, 20 Mar 2013 20:10:11 +0000 (16:10 -0400)]
Attempts to make VAC daemon quieter, per IRC discussions.
Greg Sabino Mullane [Sun, 17 Mar 2013 16:08:28 +0000 (12:08 -0400)]
Make sure regex matches so "Not needed" doesn't raise a warning.
Greg Sabino Mullane [Fri, 1 Mar 2013 21:04:23 +0000 (16:04 -0500)]
Allow transaction isolation level to be changed
Greg Sabino Mullane [Sun, 24 Feb 2013 05:01:42 +0000 (00:01 -0500)]
Better debugging sub
Greg Sabino Mullane [Thu, 21 Feb 2013 01:51:09 +0000 (20:51 -0500)]
Signature for version 4.99.7
Greg Sabino Mullane [Wed, 20 Feb 2013 15:28:25 +0000 (10:28 -0500)]
Sometimes the bucardo_delta table can get duplicate entries. Make sure the purge function is not tripped up by that.
Greg Sabino Mullane [Tue, 19 Feb 2013 22:20:34 +0000 (17:20 -0500)]
Minor Perl::Critic inspired tweaks
Greg Sabino Mullane [Tue, 19 Feb 2013 21:55:12 +0000 (16:55 -0500)]
Fix comment
Greg Sabino Mullane [Tue, 19 Feb 2013 21:54:55 +0000 (16:54 -0500)]
Show filename for subroutines that do not pass.
Greg Sabino Mullane [Tue, 19 Feb 2013 19:44:53 +0000 (14:44 -0500)]
Testing tweaks.
Greg Sabino Mullane [Tue, 19 Feb 2013 19:36:16 +0000 (14:36 -0500)]
Make sure logdest gets forced to an arrayref.
Greg Sabino Mullane [Tue, 19 Feb 2013 15:30:58 +0000 (10:30 -0500)]
Tabs to space
Greg Sabino Mullane [Tue, 19 Feb 2013 15:30:44 +0000 (10:30 -0500)]
Skip generated files from some tests.
Greg Sabino Mullane [Tue, 19 Feb 2013 15:27:08 +0000 (10:27 -0500)]
Bump version to 4.99.7
Greg Sabino Mullane [Wed, 13 Feb 2013 04:25:43 +0000 (23:25 -0500)]
Work around for Postgres bug in which notices are not picked up if unlisten * and listens are put in the same transaction!
Greg Sabino Mullane [Wed, 13 Feb 2013 04:24:43 +0000 (23:24 -0500)]
Make sure logdest works if specified in an rc file.
Have reload_config check that Bucardo is up and running first
Allow wait_for_notice to have a timeout
Greg Sabino Mullane [Tue, 12 Feb 2013 20:40:41 +0000 (15:40 -0500)]
Mild cleanups. Allow foo:bar in addition to foo=bar in the RC files
Greg Sabino Mullane [Thu, 7 Feb 2013 15:46:00 +0000 (10:46 -0500)]
Make sure that when verifying columns, etc. across source databases, we only check source databases used in the current sync. Fixes some complaints from the mailing list.