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
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
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.
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.
Greg Sabino Mullane [Wed, 6 Feb 2013 23:39:42 +0000 (18:39 -0500)]
Don't run FK info query if no FKs
Greg Sabino Mullane [Mon, 4 Feb 2013 16:01:30 +0000 (11:01 -0500)]
Bump to 2013
Greg Sabino Mullane [Fri, 1 Feb 2013 22:17:14 +0000 (17:17 -0500)]
Typo
Greg Sabino Mullane [Fri, 1 Feb 2013 21:34:18 +0000 (16:34 -0500)]
Merge remote-tracking branch 'burbon/fix-update-dbgroup'
Greg Sabino Mullane [Fri, 1 Feb 2013 21:32:31 +0000 (16:32 -0500)]
Merge remote-tracking branch 'burbon/fix-add-all-tables'
burbon [Thu, 31 Jan 2013 22:20:41 +0000 (23:20 +0100)]
FIX: bucardo update dbgroup do not affect db data
Martin Atukunda [Tue, 29 Jan 2013 21:04:50 +0000 (21:04 +0000)]
remove unnecessary variable.
Martin Atukunda [Tue, 29 Jan 2013 09:35:29 +0000 (09:35 +0000)]
use $sth->rows() to get number of rows.
From the DBI manpage:
'A DBI statement handle execute always returns true regardless of the number of rows affected, even it's zero." It only returns the number of rows affected for non-"SELECT" statements.'
This patch ensures that we get the proper count by calling $sth->rows() instead of relying on $sth->execute.
Błażej Cegiełka [Fri, 25 Jan 2013 02:11:07 +0000 (03:11 +0100)]
FIX: add all tables with table/schema limit
add no_autoabbrev to save '-n' (schema|n=s@ in second GetOptions) from binding to 'no-bucardorc' in first GetOptions
Błażej Cegiełka [Fri, 25 Jan 2013 00:33:35 +0000 (01:33 +0100)]
FIX: add all tables with exclude table/schema
Greg Sabino Mullane [Thu, 24 Jan 2013 08:10:36 +0000 (03:10 -0500)]
Idea from mailing list: combine kick triggers and funcs
Greg Sabino Mullane [Mon, 7 Jan 2013 05:03:14 +0000 (00:03 -0500)]
Show status, not details. PID is not in the syncrun table anymore.
Greg Sabino Mullane [Sat, 5 Jan 2013 04:42:00 +0000 (23:42 -0500)]
Better output for "whydie" section.
Greg Sabino Mullane [Thu, 3 Jan 2013 00:09:42 +0000 (19:09 -0500)]
More incremental work for solving the FK conflict problem.
Greg Sabino Mullane [Fri, 28 Dec 2012 04:33:48 +0000 (23:33 -0500)]
Track which tables are referencing each other via foreign keys. This is needed for conflict resolution work.
Greg Sabino Mullane [Mon, 24 Dec 2012 21:48:29 +0000 (16:48 -0500)]
Store the dbgroup rather than the sync inside of bucardo_delta_targets. This makes more sense, as not only are the track_* tables storing the db name, but the main getdelta queries use that as well. Thus, we don't want to store syncs as dbgroups are more unique.
Greg Sabino Mullane [Mon, 24 Dec 2012 05:16:05 +0000 (00:16 -0500)]
Walked through to make sure all execute() calls are followed by a finish() or a fetchall()
Greg Sabino Mullane [Mon, 24 Dec 2012 05:05:23 +0000 (00:05 -0500)]
Make sure we call finish on that statement handle.
Start making statement handles private: should probably do much more such cleaning up.
Greg Sabino Mullane [Sun, 23 Dec 2012 20:51:29 +0000 (15:51 -0500)]
Spelling tweaks.
Greg Sabino Mullane [Sun, 23 Dec 2012 19:09:14 +0000 (14:09 -0500)]
Make sure only Postgres databases try to NOTIFY
Greg Sabino Mullane [Sun, 23 Dec 2012 15:57:04 +0000 (10:57 -0500)]
Rename kidpid to kidpidlist in the MCP, as it confuses things later on as the CTL already had a kidpid.
Greg Sabino Mullane [Sun, 23 Dec 2012 15:01:18 +0000 (10:01 -0500)]
Remove tabs
Greg Sabino Mullane [Sun, 23 Dec 2012 15:00:41 +0000 (10:00 -0500)]
Set missing log_level
Greg Sabino Mullane [Sun, 23 Dec 2012 06:45:49 +0000 (01:45 -0500)]
Now have 50 passing tests!
Greg Sabino Mullane [Sun, 23 Dec 2012 06:43:44 +0000 (01:43 -0500)]
Working on getting the makedelta test working again.
Greg Sabino Mullane [Sun, 23 Dec 2012 05:06:10 +0000 (00:06 -0500)]
Properly fold in remote NOTIFY calls at the MCP level.
Greg Sabino Mullane [Sun, 23 Dec 2012 05:05:44 +0000 (00:05 -0500)]
Show which database MCP is listening for on the kid_pid_start|stop items.
Greg Sabino Mullane [Sat, 22 Dec 2012 20:54:15 +0000 (15:54 -0500)]
Line up things better in test output.
Greg Sabino Mullane [Sat, 22 Dec 2012 05:50:49 +0000 (00:50 -0500)]
Refactor all post-fork DBI cleanup into a new sub.
We attempt to call InactiveDestroy, and then delete, all existing database handles after a fork (except the initial MCP forks).
Greg Sabino Mullane [Wed, 19 Dec 2012 20:48:58 +0000 (15:48 -0500)]
We have some hard-coded requests for masterdbh inside get_dbh, so let's make a quick semaphore inside of VAC so we don't clobber masterdbh until we have created our own version.
Greg Sabino Mullane [Wed, 19 Dec 2012 20:27:10 +0000 (15:27 -0500)]
Do not have the VAC daemon re-use the "masterdbh" name as this can lead to a race condition causing a core dump. Hopefully this clears it up.
Greg Sabino Mullane [Wed, 19 Dec 2012 20:18:07 +0000 (15:18 -0500)]
Ensure we use "our" Bucardo.pm during testing, not a system one
Greg Sabino Mullane [Wed, 19 Dec 2012 03:54:55 +0000 (22:54 -0500)]
Skip "extraargs"
Greg Sabino Mullane [Wed, 19 Dec 2012 03:51:09 +0000 (22:51 -0500)]
Expand actions a bit
Greg Sabino Mullane [Tue, 18 Dec 2012 05:36:17 +0000 (00:36 -0500)]
Show which database is log for makedeltas.
Greg Sabino Mullane [Sat, 15 Dec 2012 23:12:29 +0000 (18:12 -0500)]
Cleanups and better output
Greg Sabino Mullane [Sat, 15 Dec 2012 23:12:19 +0000 (18:12 -0500)]
Make bucardo quiet when needed
Greg Sabino Mullane [Sat, 15 Dec 2012 22:49:28 +0000 (17:49 -0500)]
Make sure kid_pid_stop messages are sent from the target databases, as only those will have the correct matching PID. In theory, we could have the kids gather up their backend PIDs and notify the MCP with a payload, but it is probably not worth the trouble, as we are only doing this for clean housekeeping and prevention of a very, very, very rare false positive.
Rosser Schwarz [Fri, 14 Dec 2012 22:35:44 +0000 (14:35 -0800)]
Merge branch 'master' of bucardo.org:/var/lib/git/bucardo
Greg Sabino Mullane [Fri, 14 Dec 2012 05:52:19 +0000 (00:52 -0500)]
Output makedelta as we find it.
Greg Sabino Mullane [Fri, 14 Dec 2012 05:51:45 +0000 (00:51 -0500)]
My shell test script for makedelta work: committing in case others find it useful.
Greg Sabino Mullane [Fri, 14 Dec 2012 05:30:55 +0000 (00:30 -0500)]
Smoothly handle best-guess table names on 'bucardo update table'
Should be refactored to other places and possibly other object types.
Greg Sabino Mullane [Fri, 14 Dec 2012 05:21:05 +0000 (00:21 -0500)]
Better version of self-excluding trigger magic via MCP and KID registration.
Greg Sabino Mullane [Fri, 14 Dec 2012 04:52:54 +0000 (23:52 -0500)]
Cleanup some of the listening.
Make sure we don't throw undefined warnings when checking tables' makedelta setting.
Greg Sabino Mullane [Fri, 14 Dec 2012 04:52:28 +0000 (23:52 -0500)]
Make installation quieter when in batch mode
Greg Sabino Mullane [Fri, 14 Dec 2012 04:24:29 +0000 (23:24 -0500)]
This should be quiet too
Greg Sabino Mullane [Fri, 14 Dec 2012 04:06:34 +0000 (23:06 -0500)]
Quick application of ideas from mailing list: KIDs register with the MCP, which then ignores and triggerkicks coming from them, thus avoiding circular replication is triggerkick triggers are set to always.
David E. Wheeler [Wed, 12 Dec 2012 16:57:12 +0000 (08:57 -0800)]
Did not mean to commit that.
David E. Wheeler [Wed, 12 Dec 2012 01:06:52 +0000 (17:06 -0800)]
Add a double-multi-master replication makedelta test.
Consider this:
* You have two databases, A and B, with multi-master replication between all
of their tables.
* You have a third database, C that needs to be the target of replication for
just one of those tables, "widgets".
* If A goes down, C stil needs the widgets updated on B.
Solution:
* Add a relgroup with just "widgets"
* Enalbe "makedelta" on "widgets"
* Add a dbgroup with A:source, B:source, C:target
* Create a sync with that dbgroup and the widgets-only relgroup.
This is effectively the case these new tests demonstrate. However, it means
that there are *two* multi-master replication syncs between A and B for the
"widgets" table. This is a bit of a drag, as it means that everything will be
synced twice.
But not only that, if A goes down, will the sync with C as the target succeed
or fail?
David E. Wheeler [Wed, 12 Dec 2012 00:49:03 +0000 (16:49 -0800)]
Get `makedelta` tests passing.
Requires two things:
1. Restore the insert into the track table that was removed in
d2d2cbd1d2.
Otherwise, when the autokick kicks off the sync after the sync from A to B,
the data is synced back to A. Then back to B, and on and on.
2. Modify `wait_for_notice()` to handle a list of notices to wait for. This is
beause the syncdone message can be sent in random order, so we were getting
failures by listening for one and then another. So we allow an array
reference of notices to be passed, and it will wait for them all.
David E. Wheeler [Tue, 11 Dec 2012 19:51:52 +0000 (11:51 -0800)]
Restore listen for syncdone_deltatest2.
It is now triggered properly.
Rosser Schwarz [Tue, 11 Dec 2012 08:13:36 +0000 (00:13 -0800)]
Merge branch 'master' of bucardo.org:/var/lib/git/bucardo
Greg Sabino Mullane [Tue, 11 Dec 2012 07:00:02 +0000 (02:00 -0500)]
For the makedelta system, we'll store everything at the goat/table level: the new value is a list of databases. Remove makedelta from the db table, as it is no longer needed.
Greg Sabino Mullane [Tue, 11 Dec 2012 06:55:35 +0000 (01:55 -0500)]
Better makedelta work: this should allow things to work mostly as intended now.
Greg Sabino Mullane [Tue, 11 Dec 2012 06:53:19 +0000 (01:53 -0500)]
More makedelta work, write out some ideas.
Greg Sabino Mullane [Tue, 11 Dec 2012 06:47:59 +0000 (01:47 -0500)]
Placeholder for populating is_makedelta
Greg Sabino Mullane [Tue, 11 Dec 2012 06:42:24 +0000 (01:42 -0500)]
For makedelta, we need to set it as on/off per table inside each database. We do this via the is_makedelta attribute. If this is set, we can walk through at the end and force a track/stage update as needed, in the case where we had no delta changes on the makedelta table in question, but some other database did - which means that it put some new rows inside our delta table. Note that we don't need to explicitly update the track table, as the normal insert/update/where not exists SQL handles this case just fine.
Still to do: populate is_makedelta, based on what is in goat.makedelta and possibly also db.makedelta.
Greg Sabino Mullane [Tue, 11 Dec 2012 06:24:39 +0000 (01:24 -0500)]
This is where the makedelta track update happens.
Greg Sabino Mullane [Tue, 11 Dec 2012 06:19:23 +0000 (01:19 -0500)]
This is not the place to update track