1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-06-25 00:16:54 +02:00
Commit Graph

692 Commits

Author SHA1 Message Date
fbe4c40386 Move logic for setting Perl configuration defaults to C. 2018-03-09 09:30:50 -05:00
919635b6f4 Set config before Main::main() call to avoid secrets being exposed in a stack trace. 2018-03-08 16:24:16 -05:00
34898ce471 Error when multiple arguments are set in the config file for an option that does not accept multiple arguments.
Contributed by Cynthia Shang.
2018-03-08 14:15:05 -05:00
e331564c90 Add new test for Common::Io::Process.
Show that output on stderr will raise an exception on close() even if the exit code is 0.
2018-03-08 12:36:55 -05:00
62a9bdbd4c Fix issue passing --no-config to embedded Perl.
Reported by Ibrahim Edib Kokdemir.
2018-03-08 10:43:09 -05:00
45ffe37e4f Add cfgOptionTest().
Update cfgOption() calls that are better implemented as cfgOptionTest().

Contributed by Cynthia Shang.
2018-03-05 18:51:48 -05:00
c07aa2ae19 Improve code documentation in config module. 2018-03-02 22:42:02 -05:00
406acf9cba Enable -Wconversion and silence new warnings. 2018-03-02 12:07:12 -05:00
af805af044 Remove Debian package patch now that it has been merged upstream. 2018-03-01 16:59:13 -05:00
5d1722b8ef Disable console display of coverage for C files.
Devel::Cover does not handle it well.
2018-03-01 13:32:51 -05:00
57d70a5649 Remove RHEL package patch since upstream has been updated. 2018-03-01 13:31:03 -05:00
5b491b3035 Add CentOS/RHEL package builds. 2018-02-26 19:32:27 -05:00
64a7196cb6 Rename retention-* options to repo-retention-*. 2018-02-19 15:07:24 -05:00
f75ba7db94 Update backup host to repository host in the documentation.
Contributed by Cynthia Shang.
2018-02-19 13:17:58 -05:00
4352407777 Option rename cleanup based on review.
* Remove --reset tags from v1 options.
* Use constants for repo prefix.
* Specify CFGDEF_INDEX_PG in option structure rather than adding in code.
* Fix error message references to "backup host".

Contributed by Cynthia Shang.
2018-02-19 10:12:51 -05:00
9070325760 Improve performance of HTTPS client.
Buffering now takes the pending bytes on the socket into account (when present) rather than relying entirely on select(). In some instances the final bytes would not be flushed until the connection was closed.
2018-02-18 14:53:27 -05:00
27678f6188 Clean up and document Makefile. 2018-02-18 10:44:58 -05:00
72cbb9a9d4 Call Perl with built-in interpreter instead of execvp().
Exec'ing Perl worked fine but generated a very large command line in the process list and potentially exposed secrets.
2018-02-14 17:19:54 -05:00
81952c41f4 Report coverage errors via the console.
This helps with debugging coverage issues on remote services like Travis.
2018-02-14 17:13:18 -05:00
5f2884cb29 Suppress coverage failures for Archive/Push/Async on Travis.
The coverage report shows some code as never being run -- but that makes no sense because the tests pass.  This may be due to trying to combine the C and Perl coverage reports and overwriting some runs.

Suppress for now with a plan to implement LCOV for the C unit tests.
2018-02-14 16:46:52 -05:00
a907fd7d2d Build C binary/library for C unit tests that require Perl. 2018-02-14 10:33:21 -05:00
fda62dfc48 Move Perl option JSON generation to a new module.
Linking exec.c into LibC will not be an option once the perl exec loads the Perl interpreter.
2018-02-14 09:49:01 -05:00
5242e8eec5 Generate suppressions when running Valgrind.
This makes it easier to suppress errors that are only occurring on Travis.
2018-02-14 09:18:27 -05:00
00e9aca872 Fixed issue where --reset-* was not passing the default value to Perl.
Contributed by Cynthia Shang.
2018-02-13 15:58:14 -05:00
7c58fe7451 Use 64-bit integers for config options.
In particular, archive-queue-max requires a greater range than is provided by a 32-bit integer.
2018-02-09 13:54:33 -05:00
305a3e1761 Add int64 variant type. 2018-02-09 13:52:02 -05:00
1659598cfe Create a master list of errors in build/error.yaml.
The C and Perl errors lists are created automatically by Build.pm so they stay up to date.
2018-02-08 16:11:47 -05:00
eba31fbfe5 Update URL for Debian package repository. 2018-02-08 14:49:35 -05:00
7d13087c4b Rename -no to -reset for non-boolean options. 2018-02-06 11:26:06 -05:00
808b6000eb Fix some bugs in C config code:
1) Error when the same option is defined multiple times in a section using alternate names.
2) Fix logging of invalid command error.
3) Warn when a stanza-only option is in a global section.

Also, make a note to add validation of section names to the check command.

Per review by Cynthia Shang.
2018-02-05 15:48:26 -05:00
d35757c05f Fix missing log-level-stderr option for stanza-* commands. 2018-02-05 15:19:28 -05:00
c3f47bf240 Move config parsing out of Perl tests.
cfgParseTest() is provided in the C library for parsing configs in unit tests.
2018-02-05 12:32:30 -05:00
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
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
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
298b33988c Fix non-compliant formatting for function declarations.
Per review by Cynthia Shang.
2018-01-31 18:22:25 -05:00
bacc08792d Ensure latest db-id is selected on when matching archive.info to backup.info.
This provides correct matching in the event there are system-id and db-version duplicates (e.g. after reverting a pg_upgrade).

Fixed by Cynthia Shang.
Reported by Adam K. Sumner.
2018-01-30 16:49:47 -05:00
00f58ec8c0 Fixed inability to restore a single database contained in a tablespace using --db-include.
Fixed by Cynthia Shang.
2018-01-30 16:13:54 -05:00
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
f0ef1dee05 Improve speed of C unit tests.
Preserve object files between tests and use a Makefile to avoid rebuilding object files.
2018-01-26 16:41:17 -05:00
b58a45e067 Implement help command in C. 2018-01-23 13:34:24 -05:00
404ec30d03 Move Perl help test to real module. 2018-01-23 12:58:35 -05:00
3dd882a79e Add internal flag to config definition. 2018-01-23 12:49:04 -05:00
41bd5e8148 Improve KeyValue object.
Add kvGetList() to get a value as a list (of 1) even if it is a scalar.
2018-01-23 12:40:02 -05:00
2afb73da1c Improve String, StringList, and List objects.
* Add strCmp*() and strFirst*() to String.
* Add strLstSort() and strLstNewSplitSize() to StringList.
* Add strLstNewSplitZ() to StringList a update calls to strLstNewSplit() as needed.
* Add lstSort to List.
2018-01-23 12:17:30 -05:00
2cc9b2287b The archive-push command is now partially coded in C.
This allows the PostgreSQL archive_command to run significantly faster when processing status messages from the asynchronous archive process.
2018-01-17 15:52:00 -05:00
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
7c73f4f6c9 Add command and exit modules. 2018-01-17 09:15:51 -05:00
39cb971afb Add log module. 2018-01-16 13:52:20 -05:00
eb452c8add Improvements to Storage object.
* storagePath() and storageList() commands
* Helper functions for local and spool storag
2018-01-16 13:38:37 -05:00