1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2024-12-14 10:13:05 +02:00
Commit Graph

1311 Commits

Author SHA1 Message Date
David Steele
13cdb75ac5 v2.00: Performance Improvements for Archive Push
Features:

* The archive-push command is now partially coded in C which allows the PostgreSQL archive_command to run significantly faster when processing status messages from the asynchronous archive process. (Reviewed by Cynthia Shang.)

Improvements:

* Improve check command to verify that the backup manifest can be built. (Contributed by Cynthia Shang.)
* 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.
* Improve S3 delete performance. The constant S3_BATCH_MAX had been replaced with a hard-coded value of 2, probably during testing.
* Allow any non-command-line option to be reset to default on the command-line. This allows options in pgbackrest.conf to be reset to default which reduces the need to write new configuration files for specific needs.
* The C library is now required. This eliminates conditional loading and eases development of new library features.
* The pgbackrest executable is now a C binary instead of Perl. This allows certain time-critical commands (like async archive-push) to run more quickly.
* Rename db-* options to pg-* and backup-* options to repo-* to improve consistency. repo-* options are now indexed although currently only one is allowed.
2018-02-23 22:38:45 -05:00
David Steele
ed5876810d Fix missing variable replace for PDF code-block title.
Found by Jason O'Donnell.
2018-02-23 14:16:20 -05:00
David Steele
2485fabbad PDF rendering improvements.
* Fill is now the default for table columns.
* Column width is specified as a percentage rather that using latex-specific notation.
2018-02-22 09:31:53 -05:00
David Steele
d4418e7764 Rename pg-primary and pg-standby variables to pg1 and pg2.
It would be better if the hostnames were also pg1 and pg2 to illustrate that primaries and standbys can change hosts, but at this time the configuration ends up being confusing since pg1, pg2, etc. are also used in the option naming.  So, for now leave the names as pg-primary and pg-standby to avoid confusion.
2018-02-21 18:15:40 -05:00
David Steele
5eb682a569 Add id param for hosts created with host-add.
The host-*-ip variable is created from the id param so the name param can be changed without affecting the host-*-ip variable. If id is not specified then it is copied from name.
2018-02-21 18:10:53 -05:00
David Steele
246d441507 More flexible replacements for PDF titles and footers. 2018-02-21 15:30:35 -05:00
David Steele
aed578a4bd Allow sections to be excluded from table of contents in PDF output. 2018-02-21 15:26:30 -05:00
David Steele
64a7196cb6 Rename retention-* options to repo-retention-*. 2018-02-19 15:07:24 -05:00
Cynthia Shang
f75ba7db94 Update backup host to repository host in the documentation.
Contributed by Cynthia Shang.
2018-02-19 13:17:58 -05:00
Cynthia Shang
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
David Steele
f981283b8d Remove exit() calls from main() to make it cleaner and more testable. 2018-02-18 15:45:32 -05:00
David Steele
599e41a251 Improve S3 delete performance.
The constant S3_BATCH_MAX had been replaced with a hard-coded value of 2, probably during testing.
2018-02-18 14:54:32 -05:00
David Steele
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
David Steele
27678f6188 Clean up and document Makefile. 2018-02-18 10:44:58 -05:00
David Steele
3eed4bbb43 PDF rendering improvements.
* Check both doc-path and bin-path for logo.
* Allow PDF to be output to a location other than the output directory.
* Use PDF-specific version variable for more flexible formatting.
2018-02-16 15:09:37 -05:00
Cynthia Shang
0e27060952 Add table render for Markdown format.
Contributed by Cynthia Shang.
2018-02-16 14:55:48 -05:00
David Steele
ca52a0485e Allow code blocks to have a type.
Currently this is only rendered in Markdown.
2018-02-16 14:46:02 -05:00
David Steele
2dc0737e95 Improve section source feature to not require a title or content.
The title will be pulled from the source document.
2018-02-16 14:39:42 -05:00
David Steele
1f62237684 Clarify that S3 buckets must be created by the user.
Suggested by David Youatt.
2018-02-14 19:52:46 -05:00
David Steele
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
David Steele
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
David Steele
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
David Steele
a907fd7d2d Build C binary/library for C unit tests that require Perl. 2018-02-14 10:33:21 -05:00
David Steele
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
David Steele
68a83ea2dc Add missing const to strLstAdd(). 2018-02-14 09:21:55 -05:00
David Steele
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
Cynthia Shang
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
David Steele
213724907b Add contributor. 2018-02-09 22:27:21 -05:00
David Steele
a3b80768bd Merge 1.28 release notes. 2018-02-09 15:56:22 -05:00
David Steele
ea296372d4 Add allow range to int/float options that did not already have one. 2018-02-09 15:42:11 -05:00
David Steele
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
David Steele
305a3e1761 Add int64 variant type. 2018-02-09 13:52:02 -05:00
David Steele
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
David Steele
eba31fbfe5 Update URL for Debian package repository. 2018-02-08 14:49:35 -05:00
David Steele
7d13087c4b Rename -no to -reset for non-boolean options. 2018-02-06 11:26:06 -05:00
David Steele
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
David Steele
d35757c05f Fix missing log-level-stderr option for stanza-* commands. 2018-02-05 15:19:28 -05:00
David Steele
2074e6fbf9 Move log option update to after fork() in archive-push.
The log-level-console option should not be changed in the parent process. Even though it is harmless at the moment, that may not always be true.

Per review by Cynthia Shang.
2018-02-05 12:41:42 -05:00
David Steele
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
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
298b33988c Fix non-compliant formatting for function declarations.
Per review by Cynthia Shang.
2018-01-31 18:22:25 -05:00
David Steele
b4d434b41c Update stanza-create --force documentation to urge caution when using.
Suggested by Jason O'Donnell.
2018-01-31 17:34:27 -05:00
Cynthia Shang
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
Cynthia Shang
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
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
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
David Steele
b58a45e067 Implement help command in C. 2018-01-23 13:34:24 -05:00
David Steele
404ec30d03 Move Perl help test to real module. 2018-01-23 12:58:35 -05:00