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.
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
Rosser Schwarz [Tue, 11 Dec 2012 05:55:03 +0000 (21:55 -0800)]
added time-unit translations for de and es
Greg Sabino Mullane [Tue, 11 Dec 2012 05:46:53 +0000 (00:46 -0500)]
No longer need to worry about explicit kick after makedelta
Greg Sabino Mullane [Tue, 11 Dec 2012 05:44:42 +0000 (00:44 -0500)]
Let's make the triggerkick triggers always: this should solve one of the makedelta issues.
Greg Sabino Mullane [Tue, 11 Dec 2012 04:13:24 +0000 (23:13 -0500)]
Let's make table-level makedelta an open field for future ideas.
David E. Wheeler [Tue, 11 Dec 2012 01:27:43 +0000 (17:27 -0800)]
First stab at getting makedelta working again.
Add code to push_rows() that inserts the proper delta and track records if the
target is PostgreSQL. Tests fail just as before because nothing tickles the
autokick, which is disabled by the replication KID. There is a NOTIFY for a
makedelta job, though, so perhaps that can be used?
David E. Wheeler [Mon, 10 Dec 2012 23:38:36 +0000 (15:38 -0800)]
Use arrays.
David E. Wheeler [Mon, 10 Dec 2012 22:54:14 +0000 (14:54 -0800)]
Test makedelta vs non-makedelta.
By adding another test table with makedelta=off. Also, make sure that there
are not duplicate/multiple syncdone messages, as they would indicate circulare
replication patterns (as were present in
964ac9b and removed in
9e7227e).
Resolves #19.
David E. Wheeler [Mon, 10 Dec 2012 22:34:06 +0000 (14:34 -0800)]
Revert "Try always committing deltas on 8.4 and higher."
This reverts commit
964ac9b960bf85fe7bf01d0ece9f944170f20703.
David E. Wheeler [Fri, 7 Dec 2012 01:05:01 +0000 (17:05 -0800)]
Try always committing deltas on 8.4 and higher.
If we always log deltas and kick queues, we *never* need a `makedelta` option.
I'm not sure if this will really work in practice, however, for these reasons:
* I'm not entirely sure how Bucardo will handle the dupes. Given the previous
presence of `makedelta`, I'm assuming fine, but even so I'm not sure we want
to *always* enable them: it could create a lot more traffic between nodes.
This could potentially be mediated by adding separate delta functions for
each table and sync, but that might be a PITA.
* There is a failing test in t/40-postgres.t -- the very last test, in fact.
Something related to customcols: Database D ends up with the rows values 30,
60, 90, and 210 rather than 2, 3, 7, and 30. I am unable to figure out why
this would be.
* There may be some other consequence of doing this that could break things
that I, in my ignorance, and completely unaware of.
* This leaves older versions of PostgreSQL behind. But maybe we don't care?
8.3 is mighty old (I suspect that today's release of 8.3.22 will be the
last).
However, given all that, if this could be made to work, it's pretty damned
simple! If not, please revert this and we can come up with something else.
(Ref issue #19).
David E. Wheeler [Fri, 7 Dec 2012 00:58:20 +0000 (16:58 -0800)]
Get `help add customcols` working.
David E. Wheeler [Fri, 7 Dec 2012 00:23:01 +0000 (16:23 -0800)]
Fix failing fullcopy test.
The code deleted here was added in
63a425f0ef2b018f03eef9dd7486a7c1a9b2a390.
However, in my testing on PostgreSQL 9.2, the sequence replication tests in
t/10-fullcopy.t failed. I tried changing `defined` to `exists` but it did not
help. So I'm thinking there must be a better way to deal with sequence
attributes in older versions of PostgreSQL, though I don't know what it might
be.
David E. Wheeler [Fri, 7 Dec 2012 00:12:43 +0000 (16:12 -0800)]
Fix test failuers on later Postgres releases.
In
2d7f462e2a3ccc0ee370e10aac8811c33fbde999, Greg changed the calls to `ALTER
SEQUENCE` so that they work for older versions of PostgreSQL. However, it
broke newer versions (I'm testing on 9.2.2). It looks like the `START` clause
was added in 8.4, so let's use it as we did before for 8.4 and higher and
leave it out for 8.3 and older.
David E. Wheeler [Thu, 6 Dec 2012 22:51:43 +0000 (14:51 -0800)]
Update TODOs.
David E. Wheeler [Thu, 6 Dec 2012 22:44:47 +0000 (14:44 -0800)]
Add failing makedelta test.
Towards getting `makedelta` working again (Issue #19).
There is a `wait_for_notice` commented out, and a failing assertion on line
88. Once makedelta is fixed, the test should pass and the commented-out test
should be uncommented.
David E. Wheeler [Tue, 27 Nov 2012 00:35:21 +0000 (16:35 -0800)]
Remove `update relgroup`.
It was never implemented. Closes #22.
Greg Sabino Mullane [Tue, 27 Nov 2012 00:16:06 +0000 (19:16 -0500)]
Bare minimum seems to be 8.2. Tried 8.1 and it has lots of issues: too many to worry about fixing.
Greg Sabino Mullane [Fri, 16 Nov 2012 15:49:35 +0000 (10:49 -0500)]
Facebook
Greg Sabino Mullane [Fri, 9 Nov 2012 14:22:23 +0000 (09:22 -0500)]
More testing workarounds to support non-truncate-trigger Postgres versions. WIP.
Greg Sabino Mullane [Thu, 8 Nov 2012 22:39:46 +0000 (17:39 -0500)]
Support older versions by simply skipping unknown sequence attributes.
Greg Sabino Mullane [Thu, 8 Nov 2012 16:04:07 +0000 (11:04 -0500)]
Minor changes to support older PG versions
Greg Sabino Mullane [Thu, 8 Nov 2012 12:57:33 +0000 (07:57 -0500)]
Make sure we support PGBINDIR inside bucardo for the psql variable too.