David Steele
54dd6f3ed4
Add asynchronous, parallel archive-get.
...
This feature maintains a queue of WAL segments to help reduce latency when PostgreSQL requests a WAL segment with restore_command.
2018-04-30 17:27:39 -04:00
David Steele
89d3476e32
Refactor archive common functions in preparation for parallel async archive-get.
2018-04-29 10:16:59 -04:00
David Steele
79b7552940
Rename archive-queue-max option to archive-push-queue-max.
...
This avoids confusion with the archive-get-queue-max option. The old option name will continue to be accepted.
2018-04-18 19:37:35 -04:00
David Steele
0381945caa
Show command parameters as well as command options in initial info message.
2018-04-17 18:47:14 -04:00
David Steele
f0250dab4b
Move async forking and more error handling to C.
...
The Perl process was exiting directly when called but that interfered with proper locking for the forked async process. Now Perl returns results to the C process which handles all errors, including signals.
2018-04-12 20:42:26 -04:00
David Steele
6fd0c3dcaa
Improved lock implementation written in C.
...
Now only two types of locks can be taken: archive and backup. Most commands use one or the other but the stanza-* commands acquire both locks. This provides better protection than the old command-based locking scheme.
2018-04-11 09:36:12 -04:00
Cynthia Shang
dd31ae832d
Port most of Config::Config::configLoad() from Perl to C.
...
Contributed by Cynthia Shang.
2018-03-12 11:25:20 -04:00
David Steele
64a7196cb6
Rename retention-* options to repo-retention-*.
2018-02-19 15:07:24 -05:00
David Steele
d35757c05f
Fix missing log-level-stderr option for stanza-* commands.
2018-02-05 15:19:28 -05:00
David Steele
db21b7a360
Cleanup usage of internal options.
...
Apply internal to options that need to be read to determine locality but should not appear in the help.
2018-02-05 11:50:09 -05:00
David Steele
be90028100
Rename db-* options to pg-* and backup-* options to repo-* to improve consistency.
...
* repo-* options are now indexed although only one is allowed.
* List deprecated option names in documentation and command-line help.
2018-02-03 18:27:38 -05:00
Cynthia Shang
dc73abdb6e
Improve stanza-create command so that it does not error when the stanza already exists.
...
Contributed by Cynthia Shang.
2018-02-01 14:12:03 -05:00
David Steele
a91a648019
Config parsing no longer implemented in Perl.
...
Options are passed to Perl as JSON from the C process.
2018-01-28 21:37:09 -05:00
David Steele
1f39a34abc
Move lock release later in exitSafe().
...
This reduce the chance of a new process starting and acquiring a lock before the old process has exited.
2018-01-17 10:31:21 -05:00
Cynthia Shang
0e9ba98a50
Add stanza-delete command to cleanup unused stanzas.
...
Contributed by Cynthia Shang.
2018-01-03 12:23:33 -05:00
David Steele
c77fc1fa61
Refactor protocol param generation into a new function.
...
This allows the code to be tested more precisely and doesn't require executing a remote process.
2017-11-21 12:57:00 -05:00
David Steele
8a3425ec04
Automate generation of WAL and pg_control test files.
...
The existing static files would not work with 32-bit or big-endian systems so create functions to generate these files dynamically rather than creating a bunch of new static files.
2017-11-18 20:02:54 -05:00
David Steele
6ef2167e97
Fixed an issue retrieving WAL for old database versions.
...
After a stanza-upgrade it should still be possible to restore backups from the previous version and perform recovery with archive-get. However, archive-get only checked the most recent db version/id and failed.
Also clean up some issues when the same db version/id appears multiple times in the history.
Fixed by Cynthia Shang.
Reported by Clinton Adams.
2017-11-16 17:18:51 -05:00
Cynthia Shang
b03c26968a
Repository encryption support.
...
Contributed by Cynthia Shang.
2017-11-06 12:51:12 -05:00
David Steele
ac542788da
Convert configuration definitions from auto-generated functions to auto-generated data structures.
2017-11-02 08:14:13 -04:00
David Steele
8674a4f7ae
Allow functions with sensitive options to be logged at debug level with redactions.
...
Previously, functions with sensitive options had to be logged at trace level to avoid exposing them. Trace level logging may still expose secrets so use with caution.
2017-10-24 12:35:36 -04:00
David Steele
d82fe88031
Fix custom settings for compress-level option being ignored.
...
Reported by Jens Wilke.
2017-10-22 18:05:46 -04:00
David Steele
e1cb9ae86a
Improve labeling for errors in helper processes.
2017-10-21 14:40:14 -04:00
Cynthia Shang
2d56de00fc
Fix instances where database-id was not rendered as an integer in JSON info output.
...
Fixed by Cynthia Shang.
Reported by Jason O'Donnell.
2017-10-18 08:42:32 -04:00
David Steele
1e0ed07455
Configuration rules are now pulled from the C library when present.
2017-08-25 16:47:47 -04:00
Cynthia Shang
b6da509c9f
Consolidate stanza-create and stanza-upgrade tests into new stanza test.
...
Contributed by Cynthia Shang.
2017-08-04 16:10:51 -04:00