bucardo.git
13 years agoTypo.
Greg Sabino Mullane [Mon, 29 Oct 2012 21:56:55 +0000 (17:56 -0400)]
Typo.

13 years agoMake variables that contain PIDs from connect_database more obvious.
Greg Sabino Mullane [Mon, 29 Oct 2012 21:21:15 +0000 (17:21 -0400)]
Make variables that contain PIDs from connect_database more obvious.

13 years agoMinor comment cleanups
Greg Sabino Mullane [Mon, 29 Oct 2012 20:46:17 +0000 (16:46 -0400)]
Minor comment cleanups

13 years agoNo longer check for "perl" in process names.
David E. Wheeler [Mon, 29 Oct 2012 19:26:07 +0000 (12:26 -0700)]
No longer check for "perl" in process names.

When attempting to kill a PID, that is. It looks like, as of the first big 5.0
commit, `$0` is assigned to with the word "Budardo", but not "perl". This was
preventing the VAC process from being killed. So just check for "Bucardo", not
"perl". Closes #27.

13 years agoSet flag to run again, rather than send message.
David E. Wheeler [Mon, 29 Oct 2012 18:18:12 +0000 (11:18 -0700)]
Set flag to run again, rather than send message.

Keeps the re-try after serialization failure in the child, without relying on
the MCP sending a message to get us going again. Fortunately, the $kicked
variable was already there for just this sort of thing.

13 years agoRemove `getrows`.
David E. Wheeler [Mon, 29 Oct 2012 17:33:30 +0000 (10:33 -0700)]
Remove `getrows`.

It is not used. Custom code must fetch rows itself (`getdbh` is your friend).

13 years agoMore on what overdue and expired are for.
David E. Wheeler [Mon, 29 Oct 2012 17:28:00 +0000 (10:28 -0700)]
More on what overdue and expired are for.

13 years agoRename "goat" to "relation".
David E. Wheeler [Sat, 27 Oct 2012 00:47:36 +0000 (17:47 -0700)]
Rename "goat" to "relation".

All UI-based. Thanks to the separate table/sequence commands, there aren't too
many user-visible referenes to goats. The one place where it remains with
this commit (and the same goes for herd) is in the usage statement, which
references the `goat` table. I'd like to remove all references to tables
in usage statements altogether, but not in this commit. Resolves #24.

There was only one command that took a `goat` parameter: `add customcode`. It
was pretty seriously broken. It now mostly works, but the `relation` parameter
is ignored! This is because the customcode_map table needs an integer. So
should this be changed to "table"? And should it require the
$schema.$table_name format? Note the `XXX` added here. Ref GitHub #20.

13 years agoRename "herd" to "relgroup".
David E. Wheeler [Fri, 26 Oct 2012 23:50:41 +0000 (16:50 -0700)]
Rename "herd" to "relgroup".

Per discussion, and just in the UI: command names, parameters, and messages
sent to the user. The internals still use the term "herd" for the most part.
First half of GitHub Issue #24.

13 years agoAn attemp to document `expired`.
David E. Wheeler [Fri, 26 Oct 2012 22:24:40 +0000 (15:24 -0700)]
An attemp to document `expired`.

The difference from `overdue` escapes me, since neither seems to have an affect on whether or why a sync is kicked.

13 years agoUse ucfirst for all display items but name.
David E. Wheeler [Fri, 26 Oct 2012 22:18:52 +0000 (15:18 -0700)]
Use ucfirst for all display items but name.

13 years agoDocument no-op `getrows` param.
David E. Wheeler [Fri, 26 Oct 2012 22:10:23 +0000 (15:10 -0700)]
Document no-op `getrows` param.

And ucfirst the values in Stayalive/Kidsalive output.

13 years agoI think customcode.about is a free-form description field.
David E. Wheeler [Fri, 26 Oct 2012 21:55:40 +0000 (14:55 -0700)]
I think customcode.about is a free-form description field.

13 years agoRename configs in the database on upgrade.
David E. Wheeler [Fri, 26 Oct 2012 21:50:59 +0000 (14:50 -0700)]
Rename configs in the database on upgrade.

13 years agoRename `ping` columns to `autokick`.
David E. Wheeler [Fri, 26 Oct 2012 21:45:37 +0000 (14:45 -0700)]
Rename `ping` columns to `autokick`.

13 years agoRename `standard_conflict` to `conflict_strategy`.
David E. Wheeler [Fri, 26 Oct 2012 20:01:01 +0000 (13:01 -0700)]
Rename `standard_conflict` to `conflict_strategy`.

The latter is a better description of the purpose of the parameter. The former
is still supported by `add sync` and `update sync`, for backward
compatibility.

13 years agoMove the `standad_conflict` parameter from table to sync.
David E. Wheeler [Fri, 26 Oct 2012 18:31:28 +0000 (11:31 -0700)]
Move the `standad_conflict` parameter from table to sync.

Tables will eventually allow it to be overridden (like autokick), but
currently they don't, and in the meantime, we need to be able to set them for
syncs. Resolves GitHub issue #10.

13 years agoRename the "ping" parameter to "autokick".
David E. Wheeler [Fri, 26 Oct 2012 18:15:15 +0000 (11:15 -0700)]
Rename the "ping" parameter to "autokick".

This is to prevent confusion with the "ping" command. It's a better, more
descriptive name, anyway. Per IRC discussion.

13 years agoRemove the `do_listen` parameter
David E. Wheeler [Fri, 26 Oct 2012 16:24:11 +0000 (09:24 -0700)]
Remove the `do_listen` parameter

Per discussion. It was just an alias for `ping`.

13 years agoCancel any async queries.
David E. Wheeler [Fri, 26 Oct 2012 00:50:57 +0000 (17:50 -0700)]
Cancel any async queries.

Guess there were some still running, so we need to cancel them.

13 years agoAfter a serialization failure, we need to kick it.
David E. Wheeler [Fri, 26 Oct 2012 00:17:19 +0000 (17:17 -0700)]
After a serialization failure, we need to kick it.

13 years agoBegin experimenting with the payload system for syncsleep
Greg Sabino Mullane [Thu, 25 Oct 2012 23:52:10 +0000 (19:52 -0400)]
Begin experimenting with the payload system for syncsleep

13 years agoGah! Typo.
David E. Wheeler [Thu, 25 Oct 2012 23:50:46 +0000 (16:50 -0700)]
Gah! Typo.

13 years agoIndent `eval` block.
David E. Wheeler [Thu, 25 Oct 2012 23:49:38 +0000 (16:49 -0700)]
Indent `eval` block.

Whitespace-only change.

13 years agoLog sync sleeps in CTL.
David E. Wheeler [Thu, 25 Oct 2012 23:46:48 +0000 (16:46 -0700)]
Log sync sleeps in CTL.

And also clean up unfinished statement handles. And fix a typo!

13 years agoPluralize please
Greg Sabino Mullane [Thu, 25 Oct 2012 23:44:22 +0000 (19:44 -0400)]
Pluralize please

13 years agoIf no deltas, we want the syncdone message to be sent right away.
Greg Sabino Mullane [Thu, 25 Oct 2012 23:37:03 +0000 (19:37 -0400)]
If no deltas, we want the syncdone message to be sent right away.
Previously, it was sent only on kid-redo, whenever it happened to commit.

13 years agoRemove debugging line left in ac51423f202.
David E. Wheeler [Thu, 25 Oct 2012 23:03:30 +0000 (16:03 -0700)]
Remove debugging line left in ac51423f202.

13 years agoFix serialization exception handling.
David E. Wheeler [Thu, 25 Oct 2012 22:48:09 +0000 (15:48 -0700)]
Fix serialization exception handling.

To avoid the issues with `goto LABEL` and a global `$SIG{__DIE__}` handler yet
still concentrate the handling of serialization failures, this commit:

* Localizes all declarations of `$SIG` handlers.
* In `start_kid()`, undefines the `$SIG{__DIE__}` handler. Done because this
  method is called from `start_controller()`, which sets the `$SIG{__DIE__}`
  handler. We of course do not want to catch KID exceptions in CTL.
* Converts the `$SIG{__DIE__}` handler in `start_kid()` with a lexically-
  scoped code reference named `$err_handler`.
* Removes the serialization failure stuff from `$err_handler`.
* Wraps the rest of `start_kid()`, up to `KID`, in an `eval{}`. Errors caught
  are passed to `$err_handler`.
* Moves some variable declarations out of the `eval` so that they are
  also available in the `KID` section.
* Wraps the remainder of `start_kid()` in a second lexically-scoped
  code reference named `$runkid`.
* Executes `$runkid` in an `eval` block.
* If that call fails, non-serialization errors are handed off to
  `$err_handler`.
* Serialization errors are logged, rolled back, and slept upon. Then
  the kid function is run again.

The result is that serialization errors are properly handled now, as are all
other errors.

That doesn't mean that the handling of serialziation actually *works* (it
doesn't), but it's a step in the right direction.

Oh, and while i was there, I removed some debugging code I inadvertently
commited in 0860dc669f.

13 years agoRip out customselect.
David E. Wheeler [Thu, 25 Oct 2012 00:19:23 +0000 (17:19 -0700)]
Rip out customselect.

It has been replaced with customname. Per discussion.

13 years agoSwitch from GMT to UTC.
David E. Wheeler [Thu, 25 Oct 2012 00:02:16 +0000 (17:02 -0700)]
Switch from GMT to UTC.

Closes GitHub #2.

13 years agoAdd the patch file to the README.
David E. Wheeler [Wed, 24 Oct 2012 23:57:22 +0000 (16:57 -0700)]
Add the patch file to the README.

13 years agoUpdate the RPM support files.
David E. Wheeler [Wed, 24 Oct 2012 23:54:46 +0000 (16:54 -0700)]
Update the RPM support files.

Includes a patch that puts all the log files into /var/log/bucardo by default.

13 years agoMove distribution-supporting scripts to `dist`.
David E. Wheeler [Wed, 24 Oct 2012 23:52:14 +0000 (16:52 -0700)]
Move distribution-supporting scripts to `dist`.

13 years agoFix test failure introduced in f77fdbfd88b8.
David E. Wheeler [Wed, 24 Oct 2012 22:31:21 +0000 (15:31 -0700)]
Fix test failure introduced in f77fdbfd88b8.

BucardoTesting now throws an exception on `qx()` failure, and prepends its own
info to the returned message.

13 years agoRemove redundant LISTEN.
David E. Wheeler [Wed, 24 Oct 2012 22:28:44 +0000 (15:28 -0700)]
Remove redundant LISTEN.

The value of `"bucardo_syncdone_$sync"` is exactly the same as the `"$done"`
two lines before. And `$s` was unused.

13 years agoTest all return values of `ctl()` in postgres tests.
David E. Wheeler [Wed, 24 Oct 2012 22:26:10 +0000 (15:26 -0700)]
Test all return values of `ctl()` in postgres tests.

I am still getting test failures, but they are less noisy now that I have it
die after a `sync` fails. The current reason for the failures is that the call
to `goto KID` added in ea4923155f comes before the definition of the KID
label.

In passing, make it clearer that BucardoTesting forces a timeout even when you
pass a `0` to `ctl()`.

13 years agoWork around missing database handles.
David E. Wheeler [Wed, 24 Oct 2012 21:16:49 +0000 (14:16 -0700)]
Work around missing database handles.

This was causing tests to fail, because the KID was choking on something, and
so cleaning up, closing all database handles, but some were simply not there.
So add code to notice this condition and log a warning.

Unknown is why this happens in the first place. Bug?

13 years agoUpdate test count.
David E. Wheeler [Wed, 24 Oct 2012 18:22:40 +0000 (11:22 -0700)]
Update test count.

13 years agoDon't activate msync.
David E. Wheeler [Wed, 24 Oct 2012 18:22:10 +0000 (11:22 -0700)]
Don't activate msync.

It makes the tests BAIL OUT.

13 years agoFix exit value of `update` command.
David E. Wheeler [Wed, 24 Oct 2012 18:19:10 +0000 (11:19 -0700)]
Fix exit value of `update` command.

It was calling `exit 1` on sucess, because it expected the various `update_*`
functions to return booleans. They don't. It looks like they return undef on
success and `exit` themselves on failure.

So change the code to only exit with failure if the thing we're asked
to update is unknown. Ottherwise, call the proper `update_*` function
and `exit 0`.

Discovered by changing the `ctl` test method die if `qx()` exits abnormally
and starting to check the return value of `ctl` more often.

13 years agoFix invalid sync activation.
David E. Wheeler [Wed, 24 Oct 2012 18:18:46 +0000 (11:18 -0700)]
Fix invalid sync activation.

It was trying to start a sync named "mtest", and there is no such sync.
So test the return value of `ctl()` there and fix it.

This, BTW, causes the tests to completely bail out. Maybe msync should
not be activated?

13 years agoQuick implementation of the retry on serialization plan laid on on the mailing list.
Greg Sabino Mullane [Wed, 24 Oct 2012 03:48:59 +0000 (23:48 -0400)]
Quick implementation of the retry on serialization plan laid on on the mailing list.

13 years agoIt is possible (although very dumb) to set kid_serial_sleep to 0, so base our decisio...
Greg Sabino Mullane [Wed, 24 Oct 2012 03:40:52 +0000 (23:40 -0400)]
It is possible (although very dumb) to set kid_serial_sleep to 0, so base our decision on definededness not == 0.

13 years agoWhen scanning for errors, no need to keep scanning once we find an interesting one...
Greg Sabino Mullane [Wed, 24 Oct 2012 03:39:16 +0000 (23:39 -0400)]
When scanning for errors, no need to keep scanning once we find an interesting one (deadlock or serialization) because there can be only one such.

13 years agoSleep less; report errors.
David E. Wheeler [Mon, 22 Oct 2012 23:07:22 +0000 (16:07 -0700)]
Sleep less; report errors.

I sometimes deleted the test data directories without shutting down pg. I
would then get failures about not being able to find the postgresql.conf file.
Why? Because I was out of shared memory, so the initdb failed. But there were
no initdb errrors. So the `die $res if $? != 0;` line shows those failures.

Meanwhile, working on trying to figure out serialization failures, it seems
silly for it to sleep 10s while testing, so have it sleep for just 1s.

13 years agoRemove arg specifier.
David E. Wheeler [Mon, 22 Oct 2012 21:23:41 +0000 (14:23 -0700)]
Remove arg specifier.

13 years agoSilence warning about active statement handles.
David E. Wheeler [Mon, 22 Oct 2012 21:16:13 +0000 (14:16 -0700)]
Silence warning about active statement handles.

By calling `finish()` on them.

13 years agoDon't die when Postgres is down.
David E. Wheeler [Mon, 22 Oct 2012 19:03:50 +0000 (12:03 -0700)]
Don't die when Postgres is down.

Noticed during tests that sometimes when the `t/20-postgres.t` tests failed,
the `bucardo.mcp.pid` file was left in place. Even though the MCP was gone.
This prevented subsequent tests from running, as they couldn't start the MCP
(Bucardo thought it was still running, because the PID file was still there).

Looking through the log, I noticed that the connection to the database was
dying in `cleanup_mcp()`. Not sure why, but the log said:

    (78512) [Mon Oct 22 12:01:17.638 2012] #0578 MCP Warning: Killed (line 6722): DBD::Pg::db selectcol_arrayref failed: server closed the connection unexpectedly
     This probably means the server terminated abnormally
     before or while processing the request. at /Users/david/dev/postgresql/bucardo/blib/lib/Bucardo.pm line 6722.

That was dying, and the subsequent lines that actually delete the PID file
were therefore never run.

This commit wraps the call to the database in an `eval{}`. If it dies, the
database shutdown time is set to "unknown". We skip further database
interactions when the time is unknown. This allows the shutdown to continue
without exiting, and the MCP PID file gets cleaned up.

Resolves #26.

13 years agoDon't start bucardo when no syncs while testing.
David E. Wheeler [Sat, 20 Oct 2012 00:11:45 +0000 (17:11 -0700)]
Don't start bucardo when no syncs while testing.

This seems to prevent an error where Bucardo won't start, even though it
waited. I suspect this is becaust earlier tests run that start Bucardo with no
syncs and don't bother to stop it again, because they expect it to exit, as it
did prior to cc92a976e00df6a5182745b47793b44401e6b336.

Also, don't shut down Postgres on test exit. It just seems to confuse things.

13 years agoShut down on END instead of DESTROY.
David E. Wheeler [Fri, 19 Oct 2012 18:53:50 +0000 (11:53 -0700)]
Shut down on END instead of DESTROY.

13 years agoTake the hint and shutdown fast.
David E. Wheeler [Fri, 19 Oct 2012 01:50:54 +0000 (18:50 -0700)]
Take the hint and shutdown fast.

Fast mode does not wait for clients to disconnect, which is what we want.

13 years agoTry hader to shut down Postgres.
David E. Wheeler [Fri, 19 Oct 2012 01:34:39 +0000 (18:34 -0700)]
Try hader to shut down Postgres.

Use `pg_ctl stop`, as it seems to be more reliable: I kept seeing postgres
processes running after the tests exited. Also, add a DESTROY to be sure to
shut them all down before exiting.

13 years agoUpdate `show_why_sync_killed()`.
David E. Wheeler [Fri, 19 Oct 2012 00:38:18 +0000 (17:38 -0700)]
Update `show_why_sync_killed()`.

At least I think so. It was still querying `bucardo.q`, which was removed in
 0763c281. I replaced its calls with the columns that look more or less
 parallel, although `pid` is gone. A review would be appreciated.

I got errors about it not working while running failing tests. Still trying to
chase down the underlying failures...

13 years agoRevert moving the start file to the debug dir.
David E. Wheeler [Thu, 18 Oct 2012 23:36:20 +0000 (16:36 -0700)]
Revert moving the start file to the debug dir.

Was moved in 56ea2b2b4b0ec63383a32e8c886439a451b88929. But this turned out to
confuse things, such that tests were unable to shut down Bucardo, because the
server and the client had a different idea where the file belongs. This is
most likely the reason I was seeing stop failures as reported in GitHub
Issue #11.

Now that I understand that its location can be set via `bucardo set
reason_file`, I am just documenting that.

13 years agoIgnore bucardo.restart.reason.*.
David E. Wheeler [Thu, 18 Oct 2012 22:58:34 +0000 (15:58 -0700)]
Ignore bucardo.restart.reason.*.

13 years agoPriority currently used only for display.
David E. Wheeler [Thu, 18 Oct 2012 19:29:49 +0000 (12:29 -0700)]
Priority currently used only for display.

13 years agoDocument `checktime`.
David E. Wheeler [Thu, 18 Oct 2012 19:28:27 +0000 (12:28 -0700)]
Document `checktime`.

13 years agoDocument `overdue`.
David E. Wheeler [Thu, 18 Oct 2012 19:25:22 +0000 (12:25 -0700)]
Document `overdue`.

13 years agoMention GitHub issues, link to Mail list.
David E. Wheeler [Thu, 18 Oct 2012 18:55:33 +0000 (11:55 -0700)]
Mention GitHub issues, link to Mail list.

13 years agoRemove `limitdbs`.
David E. Wheeler [Thu, 18 Oct 2012 18:46:38 +0000 (11:46 -0700)]
Remove `limitdbs`.

Was only in 5.0 betas, but I added drop column support to `upgrade()`, anyway.
Works nicely.

13 years agoDocument aliases.
David E. Wheeler [Thu, 18 Oct 2012 00:37:58 +0000 (17:37 -0700)]
Document aliases.

13 years agoFinish basic documentation of all commands.
David E. Wheeler [Thu, 18 Oct 2012 00:34:51 +0000 (17:34 -0700)]
Finish basic documentation of all commands.

13 years agoSome more commands implemented:
David E. Wheeler [Thu, 18 Oct 2012 00:19:00 +0000 (17:19 -0700)]
Some more commands implemented:

* restart
* message
* reload
* update

Plus fixed the synopses for activate and deactivate, and listed the possible values for
the standard_conflict parameter.

13 years agoDone editing existing commands.
David E. Wheeler [Wed, 17 Oct 2012 23:47:19 +0000 (16:47 -0700)]
Done editing existing commands.

13 years agoDocument `remove` and update `reload config`.
David E. Wheeler [Wed, 17 Oct 2012 23:34:02 +0000 (16:34 -0700)]
Document `remove` and update `reload config`.

13 years agoDocument adding `customname`, `customcols`, and `customcode`.
David E. Wheeler [Wed, 17 Oct 2012 23:06:10 +0000 (16:06 -0700)]
Document adding `customname`, `customcols`, and `customcode`.

Had to do quite a bit of Googling and code archaeology to figure these out.
Hope they're correct. Corrections appreciated, especially for `customcode`,
which seems to be woefully underdocumented up to now.

13 years agoDocument `add herd` and `add sync`.
David E. Wheeler [Wed, 17 Oct 2012 21:49:50 +0000 (14:49 -0700)]
Document `add herd` and `add sync`.

Quite a few questions about some of the parameters to `add sync`, demarcated by `XXX`s.

While at it, add a brief intro discussing options and parameters.

13 years agoUpdate docs on adding tables and seuences.
David E. Wheeler [Wed, 17 Oct 2012 19:39:37 +0000 (12:39 -0700)]
Update docs on adding tables and seuences.

13 years agoStart filling out gaps in the docs.
David E. Wheeler [Wed, 17 Oct 2012 18:58:41 +0000 (11:58 -0700)]
Start filling out gaps in the docs.

And correcting apparent inaccuracies and modernizing the Pod a bit. This
commit Updates docs through `add db`. Notable changes:

* Remove the bit in the `start` docs about how it restarts Bucardo. The code
  does not appear to support that, and the `restart` command seems to have it
  covered.
* Remove the "--name" bit from the `start` and `stop` commands. There is no
  `--name` option, so I just found it confusing.
* Itemize the types supported by `list` in a Pod list.
* Itemize all the objects supported by `add`.
* Itemize all of the options to `add db`.

Proof-reading for inaccuracie would be greatly appreciated.

13 years agoStub missing commands in docs.
David E. Wheeler [Wed, 17 Oct 2012 17:59:42 +0000 (10:59 -0700)]
Stub missing commands in docs.

13 years agoThe verb is now split from the noun at line 219.
David E. Wheeler [Wed, 17 Oct 2012 00:02:40 +0000 (17:02 -0700)]
The verb is now split from the noun at line 219.

13 years agoChange default reason_file name to end in .txt.
David E. Wheeler [Tue, 16 Oct 2012 23:47:00 +0000 (16:47 -0700)]
Change default reason_file name to end in .txt.

Because it is not a log file, only the most reason reason is written
to it.

But also modify the rason log file to replace the extension from the reason
file with `.log`. So it should no longer be named
`bucardo.restart.reason.log.log` by default.

In other words, the names are:

Reason File: `bucardo.restart.reason.txt`
Rason Log:   `bucardo.restart.reason.log`.

Closes GitHub issue #9.

13 years agoMove the reason file to the debug directory.
David E. Wheeler [Tue, 16 Oct 2012 23:30:12 +0000 (16:30 -0700)]
Move the reason file to the debug directory.

Which is `.` by default, so in the default case, it will be the same as the
current behavior. Ref: GitHub Issue #9.

13 years agoSkip the .init and .spec files.
David E. Wheeler [Tue, 16 Oct 2012 23:18:01 +0000 (16:18 -0700)]
Skip the .init and .spec files.

They are not Perl. Maybe distribution-related stuff should go into another directory? `dist` perhaps?

13 years agoAdd --exit-on-nosync option.
David E. Wheeler [Tue, 16 Oct 2012 23:11:55 +0000 (16:11 -0700)]
Add --exit-on-nosync option.

And change the default so that, if there are no active syncs, by default
bucardo will *not* exit. Pass this option to make it exit anyway. Per
discussion; Closes #8

13 years agoMove all but two blocker to-dos to GitHub issues.
David E. Wheeler [Tue, 16 Oct 2012 22:51:09 +0000 (15:51 -0700)]
Move all but two blocker to-dos to GitHub issues.

They are still here, but now with links to GitHub. Could not find the post reporting the bug that checks the wrong tables, so I did not add that one. The other one I did not add was answering all mail list messages.

13 years agoAdd a Linux init script and RPM spec file.
David E. Wheeler [Tue, 2 Oct 2012 22:08:21 +0000 (15:08 -0700)]
Add a Linux init script and RPM spec file.

The latter is forked from Devrim's pgrpms spec file.

13 years agoAdd chkconfig support to the start script.
David E. Wheeler [Mon, 1 Oct 2012 22:59:43 +0000 (15:59 -0700)]
Add chkconfig support to the start script.

13 years agoClean up TODO, add some links.
Greg Sabino Mullane [Sun, 30 Sep 2012 03:50:10 +0000 (23:50 -0400)]
Clean up TODO, add some links.

13 years agoWorkarounds for empty primary key join/split problem found by Bill on mailing list.
Greg Sabino Mullane [Sat, 29 Sep 2012 03:02:25 +0000 (23:02 -0400)]
Workarounds for empty primary key join/split problem found by Bill on mailing list.

13 years agoRemove debug detritus.
Greg Sabino Mullane [Sat, 29 Sep 2012 03:01:39 +0000 (23:01 -0400)]
Remove debug detritus.

13 years agoChange PGIN to IN; consolidate flat and flatpg modes for now.
Greg Sabino Mullane [Thu, 27 Sep 2012 13:03:59 +0000 (09:03 -0400)]
Change PGIN to IN; consolidate flat and flatpg modes for now.

13 years agoand another.
Rosser Schwarz [Thu, 27 Sep 2012 07:04:00 +0000 (00:04 -0700)]
and another.

13 years agooops. missed a spot.
Rosser Schwarz [Thu, 27 Sep 2012 07:02:50 +0000 (00:02 -0700)]
oops.  missed a spot.

13 years agoconsolidating IN and PGIN blocks in delete_rows
Rosser Schwarz [Wed, 26 Sep 2012 04:25:24 +0000 (21:25 -0700)]
consolidating IN and PGIN blocks in delete_rows

13 years agoPrevent empty trailing items from being ignored when doing a split, especially for...
Greg Sabino Mullane [Wed, 26 Sep 2012 03:45:37 +0000 (23:45 -0400)]
Prevent empty trailing items from being ignored when doing a split, especially for the list of primary keys. This should fix a problem reported on the mailing list giving the error "arguments of row IN must all be row expressions"

13 years agoQuick TODO additions
Greg Sabino Mullane [Fri, 21 Sep 2012 20:45:28 +0000 (16:45 -0400)]
Quick TODO additions

13 years agoSince we use MAX(), and the table may have no rows, we need to handle getting back...
Greg Sabino Mullane [Fri, 21 Sep 2012 20:15:34 +0000 (16:15 -0400)]
Since we use MAX(), and the table may have no rows, we need to handle getting back a null, which means that $epoch may be undefined.

13 years agoFix some syntax and other problems; simple tests now show 8.1 works as a valid target...
Greg Sabino Mullane [Thu, 20 Sep 2012 20:38:44 +0000 (16:38 -0400)]
Fix some syntax and other problems; simple tests now show 8.1 works as a valid target database.

13 years agoForce time zone to uppercase GMT for old servers.
Greg Sabino Mullane [Thu, 20 Sep 2012 20:27:37 +0000 (16:27 -0400)]
Force time zone to uppercase GMT for old servers.

13 years agoCheck for cases in which the sync column of bucardo_delta_targets does not exist...
Greg Sabino Mullane [Fri, 14 Sep 2012 17:29:31 +0000 (13:29 -0400)]
Check for cases in which the sync column of bucardo_delta_targets does not exist when doing validate_sync.

13 years agoAdd a single apostrophe to text values for additional quoting checks.
Greg Sabino Mullane [Wed, 12 Sep 2012 22:13:39 +0000 (18:13 -0400)]
Add a single apostrophe to text values for additional quoting checks.

13 years agoReport proper test failure context.
David E. Wheeler [Wed, 12 Sep 2012 22:12:01 +0000 (15:12 -0700)]
Report proper test failure context.

Added a few of these lines to BucardoTesting.pm:

    local $Test::Builder::Level = $Test::Builder::Level + 1;

Because otherwise, Test::Builder reports the failure from the function or
method call in BucardoTesting.pm, rather than the calling `*.t` file. This
will make it easier to find the file and line of the actual test failure.

13 years agoAdd databas now works with the same parameters.
David E. Wheeler [Wed, 12 Sep 2012 21:55:47 +0000 (14:55 -0700)]
Add databas now works with the same parameters.

Greg says, via IRC, "We now allow that, for cool in-place table trimming." So
it seems as though the tests for it should be updated. And so they now are.

13 years agoThe pg_stat_activity PID column name has changed on 9.2.
David E. Wheeler [Wed, 12 Sep 2012 21:41:30 +0000 (14:41 -0700)]
The pg_stat_activity PID column name has changed on 9.2.

So detect if we're on 9.2 or higher, and use the new name, `pid`. Still use
the old name, `procpid`, for older versions of PostgreSQL.

13 years agoTurn list of prereqs into a Pod list and add boolean.
David E. Wheeler [Wed, 12 Sep 2012 21:22:40 +0000 (14:22 -0700)]
Turn list of prereqs into a Pod list and add boolean.

13 years agoReport reason for compile failure.
David E. Wheeler [Wed, 12 Sep 2012 21:14:56 +0000 (14:14 -0700)]
Report reason for compile failure.

13 years agoTests for same-database
Greg Sabino Mullane [Thu, 30 Aug 2012 18:22:31 +0000 (14:22 -0400)]
Tests for same-database

13 years agoAllow databases to have the same dsn, as we are moving towards in-database replication.
Greg Sabino Mullane [Thu, 23 Aug 2012 15:00:00 +0000 (11:00 -0400)]
Allow databases to have the same dsn, as we are moving towards in-database replication.