pgBackRest
Releases
v2.60.0 — Page Checksum Errors and Object Store Prefetch
Released: 2026-10-18
Core Features
-
Add
checksum-page-erroroption to error on invalid page checksums. This option applies to thebackup,restore, andexpirecommands. Thebackupcommand defaults to a warning for each file (as before) and now also reports the total number of checksum warnings at the end of the backup. Therestoreandexpirecommands default to an error. Previously therestorecommand did not report invalid page checksums at all. -
Support for GCS Workload Identity Federation. Set
repo-gcs-key-type=web-idand setrepo-gcs-keyto an external account credential file, e.g. as generated bygcloud iam workload-identity-pools create-cred-config. The web identity token is exchanged for an access token without a service account key. The token file is reloaded on each exchange to pick up rotated tokens, e.g. Kubernetes projected service account tokens. Service account impersonation is not supported. -
Prefetch multi-file/range reads from object stores. Requests are queued ahead of the current read so requests proceed while reading, and small gaps between files are read over instead of starting a new request.
Restoreuses this to read bundled files and block incremental maps, andbackupuses it to read block incremental maps from the prior backup.repo-storage-prefetch(default 3) sets how many requests are queued andrepo-storage-read-over(default 64KiB) sets the largest gap that is read over.
Core Improvements
-
Reduce keep-alive requests to remote processes. A keep-alive was sent to every remote each time a job completed in
archive-pushandbackup, even when the remotes had just been sent a request. A keep-alive is now sent only when no request has been sent to the remote for 30 seconds. -
Retry Azure batch sub-requests missing from the response. When Azure fails a batch delete it may return a single response for the entire batch. The sub-requests with no response were treated as complete, so only one file per batch was removed while the command reported success. Sub-requests with no response are now retried.
-
Reduce the manifest checks made when reconstructing
backup.info. Thebackup,expire, andannotatecommands no longer check for abackup.manifestwhen the repository listing shows the backup path does not exist, or when a diff or incr backup belongs to a full backup set that is not inbackup.info. Each check is a request so on an object store the check for a missing manifest is logged as a 404. -
Use original size to determine if a file should be bundled. The size of a block incremental file in the prior backup was used to decide whether to bundle it, so a file that had grown past
repo-bundle-limitcould still be stored in a bundle. The current size of the file is now used. -
Add context to block map read errors during backup. An error reading the block map of a prior backup now reports the file, repository path, offset, and map size. A read that returns fewer bytes than expected is reported as such instead of as a parse error.
-
Cast
current_timestamptotextin the backup start label. A user-defined implicit cast fromtimestamptztotextcaused the backup to fail with "operator is not unique: unknown || timestamp with time zone". The label text is unchanged. -
Support building on illumos. An OmniOS job has been added to CI. Solaris may also work but has not been tested.
-
Support OpenSSL 4. Building against OpenSSL 4 failed because
X509_get_subject_name()now returns aconstname. -
Fix clang builds. On Linux, gcc installs
libbacktrace.awhere clang also looks for it but installsbacktrace.hwhere only gcc can find it. A clang build found the library and then failed to compile. The library is now only used when its header is found. Return types that clang reports as narrowing conversions in debug builds are also fixed. -
Migrate code generation from C to Python. Code is generated during the build from the option, error, help, and PostgreSQL declarations by a Python tool instead of a C tool that had to be built first. Building from a git checkout requires PyYAML instead of libyaml. The release tarball includes the generated code and requires neither.
Core Development
-
General framework for new repository formats.
-
Derive the cipher key with
SHA-256for repository format 6. -
Add archive key rotation for repository format 6.
-
Reuse large freed allocations from a memory context free list.
-
Remove the
repo-putcommand and thecipher-passoption. -
Replace deprecated OpenSSL APIs.
-
Fix out-of-bounds reads found by Fil-C.
-
Fix bugs in the JSON and pack readers found by fuzzing.
-
Refactor the backup and restore modules into included modules.
-
Remove unused parameters and struct members.
-
Check that block macros are closed by the macro that matches them.
-
Improve code generation for the help and PostgreSQL interfaces.
-
Fix minor issues.
-
Store the file owner as an index rather than a pointer in the pack.
-
Increase the minimum meson version to 0.55.3.
-
Check the unity build object for unexpected exported symbols.
-
Add a line length linter and fix formatting issues.
-
Fix typos.
Documentation Improvements
-
Modernize the website. Special thanks to Jan for the insightful (and hilarious) logo. The website has a new design with light and dark themes and a layout that works on phones. Pages with a table of contents show it beside the text and mark the section being read. Commands and config files can be copied with a button, config files mark the lines each section changes, and release notes can be expanded to show more detail.
-
Document the release schedule. Feature releases are scheduled for the third Monday of January, April, July, and October. Patch releases are scheduled for the third Monday of any other month as required. The release notes introduction also describes the major, minor, and patch parts of a release number.
-
Migrate the documentation tools from C and Perl to Python. The documentation is built by
doc/doc.pyinstead of a C tool run bydoc/doc.pl, and building the documentation no longer requires Perl.
Documentation Development
-
Generate
DIST.mdfrom XML and improve the generated markdown. -
Check documentation links and option allow lists.
-
Improve the documentation build and deploy.
-
Improve the documentation build containers.
-
Merge coding standards into the contributing guide.
Test Improvements
-
Migrate the test harness from C and Perl to Python. Tests are run with
test/test.pyinstead oftest/test.pl. The test containers and CI runners no longer require Perl and the harness is covered by tests. -
Add a Fil-C job to CI. Fil-C is a memory-safe implementation of C that checks every pointer access. It found two out-of-bounds reads that gcc, clang, and Valgrind missed. A new workflow also builds and tests on the CI runner with gcc and clang, with and without the optional libraries.
-
Add fuzz testing for the
JSON,Ini, andPackreaders. The readers are fuzzed with libFuzzer, AddressSanitizer, and UndefinedBehaviorSanitizer in CI. Fuzzing found several bugs in how invalid input is read, e.g. deeply nested JSON arrays in an info file or an object store response could overflow the memory context stack. -
Allow test user names that adduser on Debian rejects. The test container is built with the same user name as the host user. Debian's
adduserrejects names that contain a dot, e.g.first.last, so the container build failed on Debian-based images for these users.
Test Development
-
Fix test builds with clang and without optional libraries.
-
Improve the Python test harness.
-
CI updates.
-
Check that every code and test module is defined and covered.
-
Improve unit and integration tests.
v2.59.3 — Weak Encryption Subkey Bug
Released: 2026-10-04
Core Bug Fixes
-
Fix possible checksum error loading encrypted info and manifest files. A large encrypted info or manifest file could lose its last lines when loaded, which failed the checksum. The lost lines had to fit in the final cipher block, so this is unlikely in practice.
-
Fix possible weak encryption subkeys/salts. When OpenSSL could not get random data from the operating system the failure was ignored, and subkeys and salts were generated from memory that was not random. An error is now reported.
v2.59.2 — PostgreSQL 19beta4 Support
Released: 2026-09-27
Core Bug Fixes
-
Fix empty block map when file is truncated to zero during backup. A block incremental file larger than
repo-bundle-limitand truncated to zero by PostgreSQL during a backup was stored as a block map with no blocks. Every later backup that referenced the file failed with "unexpected eof" until the next full backup. -
Disable read retry when filters are passed to the driver. A retried read from a repository on an object store, accessed through a repository host, crashed. These reads are no longer retried by the client. The repository host still retries its read from the object store.
-
Fix pagination of S3 version listing. Reading a repository at a target time with
repo-target-timefailed with "unable to find child 'NextContinuationToken'" when more than a thousand versions were listed under a prefix. -
Set the Azure version header for
SASauthentication. Batch deletes require the version header, so withSASauthentication every batch was rejected. The rejection looked like a single failed file, and the rest of each batch was not deleted whileexpirereported success, leaving expired backups and WAL in the repository. -
Fix async
archive-pushstalling on a zero-size backup history file. A zero-size backup history file, e.g. in a cluster copied from a storage snapshot, failed every asynchronousarchive-pushrun, so no WAL was archived.archive-push-batch-sizeis now converted to a segment count using the size of the first ready WAL segment. -
Fix
annotatecommand on a remote encrypted repository. When the repository was encrypted and the cipher was configured only on the repository host,annotatefailed to loadbackup.info.
Core Features
- PostgreSQL 19beta4/rc1 support. PostgreSQL 19beta4 reverted online page checksum changes, so the page checksum version is again limited to 0 and 1. It also changed the
pg_controlversion and the WAL page magic number.
v2.59.1 — PostgreSQL 19beta3 Support
Released: 2026-08-17
Core Bug Fixes
-
Fix hang when the chunk buffer is smaller than the input buffer. A multi-part upload to S3, GCS, or Azure could loop forever when the chunk buffer was smaller than the input buffer, e.g. after the chunk size grew during the upload. The chunk buffer is now always large enough to hold the input buffer.
-
Compare a new backup label only against its own full backup set. Some object stores keep listing a prefix after everything under it has been deleted, e.g. MinIO with object locking or SeaweedFS, so a full backup that was removed could still appear in the repository. Every diff and incr backup after it then failed with "new backup label ... is not later than latest backup label ...". A new label is now compared only against the backups in its own full backup set.
-
Fix source archives generated by GitHub missing files required to build. The source archives GitHub generates for a release were missing the code generation tooling and the files it reads, so they could not be built. Only the distribution tarball is trimmed now.
Core Features
- PostgreSQL 19beta3 support. PostgreSQL 19beta3 changed the WAL page magic number.
Documentation Improvements
-
Document exception for dots in S3 bucket names when
repo-s3-uri-style=path. Withrepo-s3-uri-style=paththe bucket is part of the path instead of the host name, so dots in the bucket name do not cause a certificate host name mismatch. -
Remove explicit
hot_standbyconfiguration from user guide.hot_standbyhas been enabled by default since PostgreSQL 10. The quickstart now notes that a standby does not accept read-only connections without it.
Documentation Development
- Fix broken release link in news.xml.
v2.59.0 — PostgreSQL 19beta2 Support
Released: 2026-07-20
Core Bug Fixes
-
Fix
expireremoving a backup in progress on another host. A backup is not added tobackup.infountil it completes, so whenexpireran on one host while a backup was running on another, e.g.expireon a standby while the primary is backed up, the backup in progress was removed. Expiration no longer removes the latest backup when it is in progress or resumable. -
Fix
archive-push-queue-maxnot enforced when a WAL file errors. In asynchronous mode the queue was measured against the WAL yet to be pushed. When a WAL file errored repeatedly the WAL files after it were pushed and no longer counted, although they stayed inpg_wal, so the queue limit was never reached andpg_walcould fill the disk. The queue is now measured against all the WAL PostgreSQL is waiting to archive, as in synchronous mode. -
Fix async
archive-getfailure during recovery across a timeline switch. Two async processes could race for the archive lock, and the one that lost exited before fetching the segment it was started for. Thearchive-getthat started it then waited forarchive-timeoutand returned an error for a segment that exists, which could end recovery early, especially across a timeline switch. The segment is now fetched directly when the async process that should fetch it is not running. -
Fix potential buffer overrun in error module. A stack trace too long for its buffer was not terminated and could be read past the end of the buffer, and an error message too long for its buffer could write past the end of it when a system error was appended. Both require an unusually long message.
-
Fix use-after-free of parallel protocol client. A client that ran out of work was freed but left in the client list and freed again on a later call. With debug or trace logging this read freed memory and could crash, e.g. a parallel backup with
log-level-file=trace. -
Fix heap overflow when a pg option is set without pg1. When
pgoptions were set for other indexes withoutpg1-path, e.g.pg2-pathandpg3-path, the index map was overwritten. This corrupted the heap on musl, e.g. Alpine, and caused a segmentation fault. The highest numberedpg-pathwas also dropped. -
Fix crash when a signal arrives during exit on musl 1.2.6. musl 1.2.6, e.g. on Alpine 3.24, crashes when
exit()is called while an exit is already in progress. This happened when a signal arrived during exit, e.g. when theservercommand terminated a child process that was already exiting. A signal that arrives during exit is now ignored.
Core Features
-
PostgreSQL 19beta1/beta2 support. Adds support for PostgreSQL 19beta1/beta2. PostgreSQL 19 can enable and disable page checksums online, and page checksums are not validated while either is in progress.
-
Add
archive-expire-beforeoption to clean up WAL archive. Theexpireoptionarchive-expire-beforeremoves WAL before a given segment from the archive but never WAL that a retained backup requires. It can clean up the archive from the restartpoint of a standby witharchive_cleanup_commandinstead ofpg_archivecleanup, which does not know about retention. -
Add batch delete for Azure storage. Files are removed with the Azure Blob Batch API, up to 256 per request, instead of one request per file. This speeds up
expireand other commands that remove files from the repository. -
Add support for S3 Outposts. Set
repo-s3-service=s3-outpostswhen using an S3 Outposts endpoint. The option sets the service name used for request signing and defaults tos3. -
Add S3 process authentication. Set
repo-s3-key-type=processand setrepo-s3-process-cmdto a command that outputs temporary credentials in the JSON format of the AWS process credential provider. The credentials are refreshed before they expire. -
Provide a distribution tarball with generated code and documentation. The tarball includes the generated code and the rendered man page and HTML documentation, so it builds and installs without the code generation and documentation tooling, including
libyaml.
Core Improvements
-
Reconnect SFTP storage after the server drops an idle connection. SFTP servers and firewalls may drop a connection that has been idle for a while, e.g. the repository read connection during the copy phase of a backup, and the next use failed with a socket error. A dropped connection is now reopened and the operation is retried once.
-
Add user/group caching for faster manifest build. When user and group names are looked up through a remote name service, e.g. sssd or LDAP, each lookup is a round trip, which dominated the manifest build for clusters with millions of files. User and group names are now cached.
-
Add per-repo backup progress to
infocommand output. When backups run on more than one repository at once, theinfocommand now reports progress for each repository as well as overall progress. The JSON output has arepoarray for each backup lock. -
Add
backup.infochecks toverifycommand. Theverifycommand now warns when a backup in the repository is not inbackup.infoand when a backup inbackup.infois missing from the repository. A missing backup is reported as having a missing manifest. -
Allow the S3 STS endpoint to be configured. Set
repo-s3-sts-hostto use a regional STS endpoint withrepo-s3-key-type=web-id, e.g.sts.eu-central-2.amazonaws.com. AWS opt-in regions do not accept credentials from the global endpoint, which is still the default. -
Add
archive-push-batch-sizeto limit WAL pushed per asynchronous run. In asynchronous modearchive-push-queue-maxis only checked at the start of a run, so a run working through a large backlog could let the queue grow well past the limit.archive-push-batch-size(default 16GiB) limits the WAL pushed per run, so the queue is checked again sooner. -
Exit async
archive-pushon first error. When the repository was unavailable the async process kept trying every ready WAL segment, so a run could take long enough forpg_walto fill beforearchive-push-queue-maxwas checked again. The run now exits on the first error, after the jobs in progress finish. -
Harden HTTP chunked response parsing. Chunk extensions and trailers are now accepted,
transfer-encodingis compared without regard to case, and a response with bothtransfer-encodingandcontent-lengthis rejected. -
Error when running as root unless
allow-rootis enabled. Running a command other thanrestoreas root could create files in the repository, e.g.backup.info, that the PostgreSQL user cannot access.allow-rootis disabled by default for every command exceptrestore, and the check also applies on remote hosts. -
Fewer binary searches when building manifest. The manifest build for a diff or incr backup searched the prior manifest three times for each file. It now searches once, which saves millions of searches for clusters with millions of files.
-
Improve seek performance during block incremental delta restore. A seek and a flush of the write buffer were done for every block written during a block incremental delta restore, and blocks are often 8KiB. The file position is now tracked and the seek and flush are only done when needed.
-
Bundle backup files in order rather than scanning for a better fit. A file that would push a bundle over
repo-bundle-sizewas skipped for a smaller file later in the queue. Files are now added in order and a bundle is closed once it reachesrepo-bundle-size, so a bundle may exceed it by up torepo-bundle-limit. -
Report the underlying error when a query fails to complete. When the connection was lost after the first result of a query was delivered, e.g. under load, the error was the generic "NULL result required to complete request". The error from PostgreSQL is now reported, with hints about a lost connection and about aggressive
idle_session_timeoutandidle_in_transaction_session_timeoutsettings. -
Report the actual error when an S3 credential request fails. An error from AWS for a
web-idorpod-idcredential request was reported as a failure to parse the response. The error returned by AWS is now reported, and the tokens are redacted when the request is logged. -
Report
archive-pushspool path errors to the PostgreSQL log. When the async spool path could not be created, e.g. permission was denied, the error could not be written to the spool andarchive-pushfailed with a generic timeout that pointed at the async log. The spool path is now created before the async process starts, so the error appears in the PostgreSQL log. -
Hint that pgBackRest may be out of date when a version is unsupported. When pgBackRest does not recognize a PostgreSQL version, e.g. an older pgBackRest on the restore host reading a backup of a newer cluster, the error now hints that pgBackRest may need to be updated on all hosts. The version is reported in user-facing form, e.g. 13 rather than 130000.
-
Add systemd notify integration. When built with
libsystemd, theservercommand notifies systemd when it is ready to accept connections and when it is stopping, as PostgreSQL and PgBouncer do. -
Suppress
unused parametererrors in meson compiler probes. The meson compiler probes declaredmain()parameters they did not use, which failed the probes when unused parameter warnings were errors. -
C11 is now the minimum C standard.
Core Development
-
Refactor restore module into included modules.
-
Update LICENSE.txt and PostgreSQL copyright for 2026.
-
Enhance StringId with optional sequence information.
-
Refactor the storage read and write interfaces.
-
Improve error handling in the SFTP storage driver.
-
Refactor the manifest module into included modules.
-
Reverse sort order in backup and restore comparators.
-
Free memory sooner in
restoreFile(). -
Move archiveAsyncExec() to command/command module and rename.
-
Ban unsafe string functions and limit an oversized log message.
-
Improve code generation for the configuration and help.
-
Improve compiler compatibility and build checks.
-
Clean up code and comments.
Documentation Improvements
-
Make
stanzaoption internal for therepo-*commands. Thestanzaoption only has an effect on therepo-*commands with undocumented storage path constants, so the documentation implied it did something it does not. The option is no longer documented for these commands and works as before. -
Document that info reads encryption settings from global section. When run without
stanzatheinfocommand reads encryption settings only from the global section, so encryption settings configured for a stanza requirestanza. -
Document that
expire-autouses thebackupcommand configuration. Automatic expiration after a backup uses the configuration of thebackupcommand, so options set only for theexpirecommand are not applied. Disableexpire-autoand runexpireseparately when it needs its own configuration. -
Document adjusting the logrotate
sudirective for a dedicated user. Packages may install a logrotate configuration that rotates the logs as thepostgresuser. When a dedicated user owns the repository and logs, thesudirective must be changed to that user or rotation fails with a permission error. -
Document that end-of-line comments are not supported in config files. End-of-line comments have never been supported, although they may appear to work for some options. Only comments on a line of their own are supported.
Documentation Development
-
Add the news page and sponsors to the website.
-
Update and correct the documentation.
-
Improve the documentation build.
-
Replace Minio with Ceph for S3 documentation and testing.
Test Improvements
- Fix Alpine group conflicts in CI containers. Group entries with members are now handled when the test group is renamed, and the Alpine group is only created when it does not already exist.
Test Development
-
CI updates.
-
Add a smoke test to verify a build against installed PostgreSQL.
-
Improve the test harness.
-
Improve unit tests.
v2.58.0 — Object Storage Improvements
Released: 2026-01-19
Core Bug Fixes
- Fix deadlock due to logging in signal handler. A signal that arrived while a lock was held by
gmtime_r(), e.g. the SIGTERM sent bystopwith--force, could deadlock when the signal handler logged. The signal handler now logs with only async-signal-safe functions.
Core Features
-
HTTP support for S3, GCS, and Azure. An object store endpoint can now begin with
http://to connect without TLS. HTTPS is still used when the endpoint does not specify a protocol. -
Allow expiration of oldest full backup regardless of current retention. The
expireoption--oldestexpires the oldest full backup and the backups that depend on it regardless of the retention settings, e.g. when the repository is running out of space. WAL before the oldest remaining full backup is expired as well. -
Support for Azure managed identities. Set
repo-azure-key-type=autoto fetch credentials automatically using managed identities instead of configuring them. The credentials are refreshed before they expire. -
Experimental support for S3 EKS pod identity. Set
repo-s3-key-type=pod-idto fetch credentials automatically using EKS pod identity instead of configuring them. The credentials are refreshed before they expire. -
Allow configuration of TLS cipher suites. Set
tls-cipher-12for TLS 1.2 andtls-cipher-13for TLS 1.3, e.g. for compliance. The cipher suites apply to every connection a process makes. -
Allow process priority to be set.
prioritysets the scheduling priority of pgBackRest processes from -20 to 19, as withnice. A higher value makes pgBackRest less likely to interfere with PostgreSQL.
Core Improvements
-
Allow dots in S3 bucket names when using path-style URIs. Dots in a bucket name only cause a certificate host name mismatch with host-style URIs, so they are now allowed with
repo-s3-uri-style=path, which most self-hosted S3 services use. -
Require TLS >= 1.2 unless verification is disabled. TLS 1.0 and 1.1 have been deprecated since 2021. Verification is always enabled for connections between pgBackRest hosts. When verification is disabled for an object store with
repo-storage-verify-tls, e.g. for a self-signed certificate, every protocol version is allowed. -
Dynamically size S3/GCS/Azure chunks for large uploads. The number of chunks in an upload is limited, so with the default
repo-storage-upload-chunk-sizethe largest file that could be uploaded was 50GiB to S3, 40GiB to GCS, and 200GiB to Azure. The chunk size now grows during an upload, so files up to 5TiB can be uploaded to S3 and GCS and up to 45TiB to Azure. -
Optimize S3/GCS/Azure chunk size for small files. The whole chunk buffer was allocated when a file was opened, although many files are smaller than a chunk. The buffer now grows as data arrives, which saves memory when small files are uploaded.
-
Remove support for PostgreSQL
9.5. PostgreSQL 9.5 is no longer supported, per the policy of supporting five end-of-life versions of PostgreSQL. -
Improve logging of default for options with an unresolved dependency. An option set in the configuration file was logged at the start of a command when its dependency was not resolved, although its default value was used. The option is no longer logged in this case.
Core Development
-
Simplify the versioned PostgreSQL types.
-
Use get_option() for tasks supported by the new meson version.
-
Simplify the option definitions in config.yaml.
-
Use JsonRead for all info JSON parsing.
-
Refactor StringId and option parsing.
-
Fix logging, formatting, and comments.
Documentation Improvements
-
Remove explicit
max_wal_senders/wal_levelconfiguration from user guide.max_wal_sendersandwal_levelhave defaulted to the values the user guide requires since PostgreSQL 10. -
Clarify that bundling is useful for filesystems with large block sizes. Bundling saves space on filesystems with large block sizes, where each small file takes a whole block.
Documentation Development
-
Improve the documentation build.
-
Improve wording in the user guide.
Test Development
-
Fix WAL segment numbering in command/expire unit test.
-
CI updates.
v2.57.0 — Suppress Repository Symlinks
Released: 2025-10-18
Core Bug Fixes
-
Unnest HTTP/TLS/socket timeouts. A failed socket connection was also retried by the TLS and HTTP layers, so with the default
io-timeoutof 60 seconds a connection took nine minutes to time out. Each layer now retries only its own failures. -
Fix possible segfault in page checksum error message. The error message for invalid page checksums used a string that was out of scope, which could log garbage or crash. This was most likely with pg_tde, since every encrypted file fails the page checksum.
-
Fix possible segfault in backup resume messages. The message that reports why a backup cannot be resumed used a string that was out of scope, which could log garbage or crash.
Core Features
- Add
repo-symlinkoption to suppress creation of repository symlinks. Some filesystems that are otherwise Posix-compatible do not support symlinks. Setrepo-symlink=nto keep thelatestand tablespace symlinks from being created in the repository.
Core Improvements
- Add HTTP retries for 408 and 429 errors. HTTP 408 (Request Timeout) and 429 (Too Many Requests) errors are now retried. 429 errors are common on Cloudflare R2.
Core Development
-
Finalize catalog number for PostgreSQL 18 release.
-
Remove unused code and fix comments.
Documentation Development
- Update user guide and tests to Ubuntu 22.04.
Test Development
-
CI updates.
-
Clean up unit tests.
v2.56.0 — Progress Info Improvements
Released: 2025-07-21
Core Bug Fixes
- Fix issue with adhoc expiration when no backups in a repository. Adhoc expiration failed with "cannot get index 0 from list with 0 value(s)" when a repository had no backups.
Core Features
-
Add restore progress to
infocommand output. Therestorecommand now records its progress, which theinfocommand reports alongside backup progress. A restore is also no longer terminated by thestopcommand. -
Add progress-only detail level for
infocommand output. Set--detail-level=progressto report only progress, which is faster because the repository is not read. The default isfull.
Core Improvements
-
Retry failed reads on object stores. A read from an object store that failed after it started was fatal, which could restart an expensive job, e.g. during restore. A failed read is now retried from where it left off.
-
Fix defaults in command-line help. When an option has more than one default, e.g.
repo-storage-upload-chunk-sizewith an S3 and an Azure repository, the option list shows<multi>and the help for the option lists each default. Defaults are not shown for options that are not valid in the current configuration.
Core Development
-
Improve the predictability of floating point numbers formatted as strings.
-
Improve option defaults and dependencies.
-
Clean up code.
Documentation Improvements
-
Describe discrete option values in a list where appropriate. The values of options such as
outputfor theverifyandversioncommands are now described as a list, as for other options. -
Fix "less than" in help output for
archive-modeoption.
Documentation Development
- Update the contributing, release, and support documentation.
Test Development
-
CI updates.
-
Improve unit tests.
v2.55.1 — Bug Fixes
Released: 2025-05-05
Core Bug Fixes
-
Revert "calculate content-md5 on S3 only when required". S3 requires either
content-md5or anx-amz-content-*checksum for uploads when object lock is enabled, and Scality did not accept the alternate checksums, so uploads failed.content-md5is calculated for all requests with content again. -
Fix lower bounds checking for option keys. An indexed option with a key of 0, e.g.
pg0-path, caused a segfault. It is now an error.
Documentation Development
- Add details about notifying packagers to release instructions.
v2.55.0 — Verification Improvements and PostgreSQL 18 Support
Released: 2025-04-21
Core Bug Fixes
-
Fix block incremental restore issue on non-default repository. When the backup being restored used block incremental and was not in the lowest numbered repository, the restore read part of the block incremental data from the lowest numbered repository. Setting
repoworked around the problem. -
Do not set
recovery_target_timeline=currentfor PostgreSQL < 12. Before PostgreSQL 12, explicitly settingrecovery_target_timelinetocurrentbehaves aslatest, althoughcurrentis the default. The setting is now left out ofrecovery.confwhen it is set tocurrentfor these versions. -
Fix expire archive range logging. Only the last archive path removed was logged as the start of the range, so the log suggested that far fewer files were expired than were.
-
Fix error reporting for queries with no results. An error from a query that expected no results was reported as an unexpected result instead of as the error.
Core Features
-
Verify recovery target timeline. A backup that cannot follow the target timeline, e.g. one made after a standby was promoted and the new timeline forked off, failed only when recovery started, with a PostgreSQL error that is hard to interpret. The timeline is now checked against the history files before the restore starts.
-
Allow verification of a specified backup. The
verifyoption--setverifies only the specified backup and the WAL required to make it consistent. -
Add support for S3/GCS requester pays. Set
repo-s3-requester-paysorrepo-gcs-user-projectto bill the requester instead of the bucket owner, e.g. so a hosted service can give customers access to their backups. -
PostgreSQL 18 support. This release was made before PostgreSQL 18 had a beta, so support was initially experimental. Nothing that affects pgBackRest changed before PostgreSQL 18.0.
-
Allow connections to PostgreSQL on abstract domain sockets.
pg-socket-pathno longer has to be an absolute path, so it can name an abstract domain socket. libpq reports a path that is not valid. -
Add numeric output to
versioncommand. Set--output=numto output the version as a number, e.g. 2055000, which is easier to compare.
Core Improvements
-
Allow backup command to operate on remote repositories. The
backupcommand can now run on a host where the repository is remote, which allows more flexibility in where backups are run. -
Use lz4 for protocol compression. lz4 compresses much faster than gz and gives similar ratios at the low levels used for protocol compression. Setting
compress-level-network=0no longer disables protocol compression. -
Calculate
content-md5on S3 only when required. Thecontent-md5header is only calculated for batch delete requests, which require it, to save CPU when files are uploaded. This change was reverted in v2.55.1. -
Warn when a value for a multi-key option is overwritten. Options with key/value pairs, e.g.
recovery-option, silently overwrote a value when its key was specified again. A warning is now logged. -
Add detail logging for expired archive path. Removing a large number of archive files could look like a hang. A message at detail level now shows progress.
-
Remove support for PostgreSQL
9.4. PostgreSQL 9.4 is no longer supported, per the policy of supporting five end-of-life versions of PostgreSQL. Backups of 9.4 clusters can still be expired. -
Remove autoconf/make build. v2.54.0 was the last release to support the autoconf/make build. Use meson to build.
Core Development
-
Revert "full/incremental backup method."
-
Improve hex encode performance with bytewise lookup.
-
Fix missing
returninFUNCTION_LOG_RETURN_VOID(). -
Remove extraneous const from
cvtIntToZ()prototype. -
Enable additional compiler warnings.
-
Improve logging macros and their coverage.
-
Allow negative values for integer options.
-
Refactor the compression and protocol modules.
-
Update LICENSE.txt and PostgreSQL copyright for 2025.
-
Separate version into component parts.
-
Add StringId linter.
-
Refactor code to satisfy Coverity.
-
Fix typos.
-
Clean up code.
Documentation Improvements
-
Fix documentation for specifying multiple stanzas with
tls-server-auth. Multiple stanzas are specified fortls-server-authas a comma-separated list. The documentation said to repeat the option. -
Clarify incremental backup expiration. The documentation implied that incremental backups are expired by count. It now explains how incremental backups are expired and that full backups count as differential backups for differential retention.
-
Clarify requirement for local/remote pgBackRest versions to match.
-
Add FAQ about exporting self-contained cluster. The FAQ explains how to create a self-contained export of a cluster with a backup made with
--archive-copyand restored with--type=none. -
Caveat
--tablespace-map-allregarding tablespace creation. A tablespace created after the backup starts is not in the manifest, sotablespace-map-allcannot map it. -
Clarify behavior of
--repo-retention-full-type. -
Change
--process-maxrecommendation for object stores to--repo-bundle. On object storesrepo-bundlereduces the time spent creating files far more thanprocess-maxdoes, because fewer files are created. -
Update
unix_socket_directorytounix_socket_directories.unix_socket_directoryhas not been valid since PostgreSQL 9.2, so onlyunix_socket_directoriesis documented. -
Recommend not placing
spool-pathwithinpg_xlog/pg_wal. A spool path insidepg_xlogorpg_walcan cause problems for PostgreSQL tools such aspg_rewind.
Documentation Development
-
Fix instances of "of of".
-
Update and correct the documentation.
Test Development
-
Fix tests, logging, and comments in unit tests.
-
CI updates.
-
Improve the integration and unit tests.
v2.54.2 — Bug Fix
Released: 2025-01-20
Core Bug Fixes
- Fix issue after disabling bundling with block incremental enabled. When bundling was disabled after backups were made with bundling and block incremental enabled, the prior backups could not be read. The setting needed to read them is now preserved.
Core Development
- Update LICENSE.txt and PostgreSQL copyright for 2025.
Documentation Improvements
- Clarify behavior of multiple configuration files. Each configuration file must be valid on its own, so a section must be specified in each file that sets an option in it. The documentation also notes that quoting is not supported, whitespace is trimmed from keys and values, and repeated sections are merged.
Documentation Development
- Clarify that unhandled errors may occur in edge cases.
Test Development
- Update CI and integration tests.
v2.54.1 — Bug Fix
Released: 2024-12-16
Core Bug Fixes
- Fix issue with
version/helpcommands attempting to loadpgbackrest.conf. In v2.54.0 theversionandhelpcommands loadedpgbackrest.confand failed when it could not be read or parsed.
Core Development
- Exclude logging macros from coverage reporting and fix volatile qualifiers.
Documentation Development
- Update documentation and release notes.
Test Improvements
- Stabilize async archiving in integration tests. An async
archive-getleft running by one integration test could write an error to the queue of the next test and fail its recovery.
Test Development
- Update CI and integration tests.
v2.54.0 — Target Time for Versioned Storage
Released: 2024-10-21
Core Bug Fixes
- Fix PostgreSQL query performance for large datasets. The query timeout logic delayed reading query results, which could make a query that returned a large result take up to
db-timeout. Results are now read as soon as they are available.
Core Features
-
Allow repositories on versioned storage to be read at a target time. The
archive-get,info,repo-get,repo-ls,restore, andverifycommands can read a repository on versioned Azure, GCS, or S3 storage as it was atrepo-target-time. This allows recovery even when the repository has been deleted or corrupted, accidentally or maliciously. -
Allow requested standby backup to proceed with no standby. Set
backup-standby=preferto back up from a standby when one is available and from the primary otherwise. This does not help when the standby responds but fails to sync with the primary after the backup starts.
Core Improvements
-
Summarize backup reference list for
infocommand text output. The backup reference list can be very long, so the text output of theinfocommand now summarizes it. The full list is shown when--setis specified. -
Refresh web-id token for each S3 authentication. The token file named by
AWS_WEB_IDENTITY_TOKEN_FILEwas read once at startup, so the token could expire during a long operation. The token is now read for each authentication. -
Correctly display current values for indexed options in help. The current value shown for an indexed option was always the value for the first index, e.g.
pg1-path. The option help now lists the value for each index, and the option list shows<multi>when there is more than one. -
Save
backup.infoonly when contents have changed.expiresavedbackup.infoeven when it had not changed. Fewer saves also make it easier to choose a target time on versioned storage. -
Remove limitation on reading files in parallel during restore. The protocol could only read or write one file at a time on a remote, so a restore read one file at a time from the repository. Protocol commands can now be multiplexed, so a restore can read more than one file at a time, e.g. a bundle and the block incremental data for a file in it.
-
Improve SFTP error messages. SFTP errors were reported as numbers only. They now include a description of the error.
Core Development
-
Refactor config parsing and the help and version commands.
-
Refactor the storage and protocol modules.
-
Finalize catalog number for PostgreSQL 17 release.
-
Retry socket bind.
Documentation Features
- Add performance tuning section to user guide. The options that commonly improve performance were spread through the documentation. The quickstart now has a section that lists them.
Documentation Improvements
-
Clarify source for
data_directory.pg-pathshould match thedata_directoryreported by PostgreSQL, which may differ from the value inpostgresql.conf. -
Better logic for deciding when a summary should be lower-cased. Summaries that start with a proper name or an acronym, e.g. PostgreSQL, are no longer lower-cased in the documentation.
Documentation Development
-
Update documentation.
-
Improve documentation build.
Test Development
-
Improve test harness and unit tests.
-
CI updates.
v2.53.1 — PostgreSQL 17 Support
Released: 2024-08-19
Core Bug Fixes
-
Fix permissions when
restorerun as root user. Whenrestorewas run as root,pg_controlwas owned by root. A restore as root also failed when the base path did not exist. -
Fix segfault on delayed connection errors. A connection error that was delayed long enough to be reported on a later wait could cause a segfault.
-
Skip local repository duplicate check for SFTP. The check for local repositories that are configured more than once was also applied to SFTP repositories, which are never local.
Core Improvements
- PostgreSQL 17 support. PostgreSQL 17beta3 changed the control and WAL formats, which is unusual for a beta.
Core Development
- Do not allow help for command roles other than main.
Documentation Development
- Fix typo in user guide.
v2.53 — Concurrent Backups
Released: 2024-07-22
Core Bug Fixes
- Fix SFTP renaming failure when file already exists. Some SFTP servers report that a file already exists with an error that was not handled, so renaming a file over an existing file failed.
Core Features
-
Allow backups to run concurrently on different repositories. Backups of the same stanza can now run at the same time on different repositories, since locks are now per stanza and repository instead of per stanza. This is not possible for PostgreSQL <= 9.5.
-
Support IP-based SANs for TLS certificate validation. Certificates with an IP address as the subject alternative name, e.g.
IP:1.2.3.4, are now validated. IPv4 and IPv6 addresses must match exactly.
Core Improvements
-
Default
log-level-stderroption tooff. Warnings and errors written to stderr were often lost when only stdout was redirected while collecting logs. An explicitly setlog-level-stderris not affected. -
Allow alternative WAL segment sizes for PostgreSQL ≤ 10. PostgreSQL <= 10 can be built with a different WAL segment size, and forks such as Greenplum set it with
initdb. -
Add hint to check SFTP authorization log. When SFTP authentication fails the error now hints that the authorization log on the server may have more detail.
-
Display time option defaults and allowed values with appropriate units. Time option defaults and allowed values were shown in seconds, which was hard to read for large values. Fractional seconds are no longer allowed, so a value such as
archive-timeout=0.5must be written asarchive-timeout=500ms. -
Require OpenSSL >= 1.1.1.
Core Development
-
Require the lz4 library and compiler builtins in the meson build.
-
Improve option units, defaults, and error messages.
-
Improve option and command parsing.
-
Improve reading lock files in the
infoandstopcommands. -
Refactor the backup and manifest code.
-
Fix formatting.
Documentation Improvements
- Clarify
archive-pushmulti-repo behavior. When one repository is failing,archive-pushcannot push ahead to the other repositories unlessarchive-asyncis enabled.
Documentation Development
- Update the contributing documentation and the documentation and test tools.
Test Development
-
Migrate coverage testing to C and remove dependency on lcov.
-
CI updates.
v2.52.1 — Bug Fix
Released: 2024-06-25
Core Bug Fixes
- Fix issue with files larger on the replica than on the primary. With block incremental, when a file was a different size on the primary than on the standby during a backup from standby, the next diff or incr backup stored the size from the primary. The backup after that failed with "repo size must be > 0".
v2.52 — PostgreSQL 17beta1 Support
Released: 2024-05-27
Core Features
-
Add GCS batch delete support. Files are removed with batch requests instead of one request per file, which speeds up
expireand other commands that remove files from the repository. -
S3
SSE-Cencryption support. Setrepo-s3-sse-customer-keyto have S3 encrypt the data with the provided key after it is transmitted. This is not as secure as encrypting the data before it is transmitted withrepo-cipher-type. -
PostgreSQL 17beta1 support. Adds the catalog version and WAL magic number for PostgreSQL 17.
Core Improvements
-
Allow explicit disabling of optional dependencies in meson builds. An optional feature can be disabled in the meson build even when its library is installed, as some platforms require, e.g. FreeBSD. By default a feature is enabled when its library is found.
-
Dynamically find python in meson build. The meson build now finds the python installation instead of requiring a
python3binary on the path, e.g. when onlypython3.9is installed. The minimum meson version is now 0.47. -
Tag
pgbackrestbuild target in meson as installable.
Core Development
-
Update Fedora test image to Fedora 38.
-
Update modules to recent coding standards.
-
Silence Coverity complaints.
-
Clean up code and comments.
Documentation Improvements
- Update
start/stopdocumentation to reflect actual functionality.
Documentation Development
- Update the contributors, release notes, and metrics report.
Test Development
-
Improve unit tests.
-
CI updates.
v2.51 — Meson Build System
Released: 2024-03-25
Core Bug Fixes
-
Skip zero-length files for block incremental delta restore. An existing zero-length file caused a block incremental delta restore to fail in the block checksum filter. These files are now skipped, since there is nothing in them to reuse.
-
Fix performance regression in storage list. Listing a path requested detailed information for each file, which could be slow, e.g. on object stores. Only the information the list needs is now requested.
-
Fix progress logging when file size changes during backup.
Core Improvements
-
Improved support for dual stack connections. When a host name resolves to more than one address, e.g. IPv4 and IPv6, the next address is tried once the prior address has had reasonable time to connect, following the "happy eyeballs" approach of RFC 8305. A connection attempt that neither fails nor connects no longer uses up all the available time.
-
Make meson the primary build system. meson is now the build system used for testing and for building the documentation. Functions not used outside their module are now hidden, which makes the binary smaller.
-
Detect files that have not changed during non-delta incremental backup. During a non-delta diff or incr backup, a file that fits in a single buffer, or any block incremental file, is compared to the file in the prior backup and referenced instead of stored when it has not changed.
-
Prevent invalid recovery when
backup_labelremoved. Whenbackup_labelis removed from a restored cluster, PostgreSQL uses the checkpoint inpg_controlfor crash recovery, which nearly always corrupts the cluster. Restore now invalidates the checkpoint inpg_control, so recovery fails instead.pg_controldatashows the checkpoint as0/DEAD. -
Improve
archive-pushWAL segment queue handling. The size of every WAL segment in the queue was read to measure the queue. The size of the first segment is now used for all of them. -
Limit resume functionality to full backups. Resume did not work correctly for delta diff and incr backups, and a file that changed since the prior backup is likely to change again before a resume. Only full backups are resumed now.
-
Update resume functionality for block incremental. Resume removed block incremental files, so it worked but copied all of them again. Block incremental files are now kept on resume.
-
Allow
--versionand--helpfor version and help.--versionand--helpnow work as they do for most programs. Usehelpfor help on a specific command or option. -
Add detailed backtrace to autoconf/make build. Error stack traces in the autoconf/make build now include detail from libbacktrace, which performance tests showed has no noticeable cost.
Core Development
-
Improve sort comparators.
-
Fix help not displaying help for the help command.
-
Update config.guess and config.sub to latest versions.
-
Improve asserts.
-
Validate more fields in
pg_control. -
Redact secure options in check --report.
Documentation Improvements
- Update references to
recovery.conf. References torecovery.confnow includepostgresql.auto.conf, which newer versions of PostgreSQL use.
Documentation Development
-
Migrate man page generation to C.
-
Add release instructions to update PostgreSQL ecosystem wiki.
Test Development
-
Migrate integration tests to C.
-
Improve unit tests and test tools.
-
CI updates.
v2.50 — Performance Improvements and Bug Fixes
Released: 2024-01-22
Core Bug Fixes
-
Fix short read in block incremental restore. A compressed super block can end with bytes that are not needed to decompress it but mark the end of the data. Depending on how a buffer lined up with the data, these bytes were not read and the restore failed.
-
Fix overflow suppressing backup progress in
infooutput. The sizes in the lock file were read as 32-bit values, so theinfocommand did not report progress for a backup larger than 4GiB.
Core Improvements
-
Preserve partial files during block incremental delta restore. A file smaller than expected was not kept for a block incremental delta restore, although its blocks can be reused, e.g. when retrying a restore that failed or restoring over a smaller file.
-
Add support for alternate compile-time page sizes. PostgreSQL can be built with a different page size, e.g. 4096, and forks such as Greenplum do this.
-
Skip files truncated during backup when bundling. A file truncated to zero after the files were assigned to bundles was still stored in its bundle, and a debug build failed an assertion. These files are now skipped.
-
Improve SFTP storage error messages.
Core Development
-
Refactor backup incremental manifest generation.
-
Refactor backup and retry code.
-
Improve logging of file size changes and resume warnings during backup.
-
Fix comments.
-
Update LICENSE.txt and PostgreSQL copyright for 2024.
Test Development
-
Improve unit tests.
-
CI updates.
v2.49 — Remove PostgreSQL 9.3 Support
Released: 2023-11-27
Core Bug Fixes
-
Fix regression in retries. v2.48 dropped the retry that was made when an operation used up its whole timeout, so a timeout became an error, e.g. waiting for a socket to be writable on an object store. Two retries are now made even when the timeout has expired.
-
Fix recursive path remove in SFTP storage driver. Some SFTP servers report permission denied instead of a failure when a directory is unlinked as a file, so removing a path recursively failed on those servers.
Core Improvements
- Remove support for PostgreSQL
9.3. PostgreSQL 9.3 is no longer supported, per the policy of supporting five end-of-life versions of PostgreSQL.
Core Development
-
Fix
storageReadRemote()to return actual read bytes. -
Update config.guess and config.sub to latest versions.
-
Clean up code.
Documentation Features
-
Document maintainer options. Maintainer options are now documented in their own section with the caveats for using them, and
pg-version-forceis no longer internal. -
Update point-in-time recovery documentation for PostgreSQL >= 13. Since PostgreSQL 13 recovery errors when the recovery target is not reached. The point-in-time recovery section now works for PostgreSQL 13 and later as well as for earlier versions.
Documentation Development
-
Build command and configuration reference in C.
-
Update the site introduction and the user guide.
-
Update Minio test/documentation container version.
Test Improvements
- Allow
config/loadunit test to run withoutlibssh2installed.
Test Development
-
Remove unused fields from
backupJobResult()test in command/backup unit. -
Improve unit tests.
-
Add test to show behavior of bundled files truncated during backup.
v2.48 — Repository Storage Tags
Released: 2023-09-25
Core Bug Fixes
- Fix issue restoring block incremental without a block list. A block map with no blocks, which is written when a file timestamp changes but the file does not, was not decrypted when it followed a file stored without block incremental in the same bundle read. With enough affected files the retries were exhausted and the restore failed.
Core Features
-
Add
--repo-storage-tagoption to create object tags. Setrepo-storage-tagto add tags to the objects written to an S3, GCS, or Azure repository. Tags are set for each repository. -
Add known hosts checking for SFTP storage driver. SFTP host keys are now checked against the known hosts files by default, i.e.
repo-sftp-host-key-check-type=strict. Setrepo-sftp-host-key-check-type=accept-newto add new hosts automatically, orrepo-sftp-host-key-check-type=noneto skip the check as before. -
Support for dual stack connections. Each address a host name resolves to is now tried in turn, e.g. an IPv6 address with no route to the host and then an IPv4 address, until one connects or the timeout expires. Repeated retry errors are also summarized in error messages.
-
Add backup size completed/total to
infocommand JSON output. The JSON output of theinfocommand now includes the completed and total size of a backup in progress, so progress can be monitored by other programs.
Core Improvements
-
Multi-stanza check command. When
stanzais not specified, thecheckcommand now checks every stanza in the configuration. -
Retry reads of
pg_controluntil checksum is valid. On some filesystems, e.g. ext4, a read ofpg_controlduring a concurrent write can return torn data. The read is now retried until the checksum is valid. -
Optimize WAL segment check after successful backup. The check for WAL segments after a backup listed the storage once for each segment. Each WAL directory is now listed once and the list is reused.
-
Improve GCS multi-part performance. Chunks of a multi-part upload are now uploaded as soon as they are available.
-
Allow
archive-getcommand to run when stanza is stopped. Thearchive-getcommand does not write to the repository, so it can now run while the stanza is stopped, asrestorecan. -
Accept leading tilde in paths for SFTP public/private keys. Paths for
repo-sftp-private-key-fileandrepo-sftp-public-key-filemay now begin with~, as documented. -
Reload GCS credentials before renewing authentication token. The service key file is now read again before the authentication token is renewed, so the key can be replaced while a command is running.
Core Development
-
Add report option to
checkcommand. -
Update config.guess and config.sub to latest versions.
-
Update xxHash to v0.8.2.
-
Clean up code.
-
Finalize catalog number for PostgreSQL 16 release.
-
Add prefix to meson build target to avoid conflicts.
-
Fix manifest command filter for files in a tablespace.
-
Add block incremental info to restore detail logging.
Documentation Bug Fixes
-
Fix configuration reference example for the
tls-server-addressoption. The example::*was not valid. Use*for IPv4 or::for IPv6. -
Fix command reference example for the
filteroption.
Documentation Development
-
Split release notes into individual files.
-
Update help title for the --annotation option.
Test Improvements
- Allow
storage/sftpunit test to run withoutlibssh2installed.
Test Development
-
Improve unit tests.
-
CI updates.
v2.47 — Performance Improvements and Bug Fixes
Released: 2023-07-24
Core Bug Fixes
-
Preserve block incremental info in manifest during delta backup. When a file changed so that it would not use block incremental if it were new, e.g. it shrank below the block incremental limit or its timestamp moved far enough into the past, its block incremental info was lost from the manifest of a delta backup even though the file could still be referenced to the prior backup.
-
Fix block incremental file names in
verifycommand. Theverifycommand used the compression extension instead of.pgbifor block incremental files stored outside a bundle, so it could not find them. -
Fix spurious automatic delta backup on backup from standby. File sizes on the standby can differ from the primary, e.g. for free space maps, so the next incremental backup could see a size change on the primary and switch to a checksum delta, which can take much longer. The original size is now kept in the manifest and used for the comparison.
-
Skip
recovery.signalfor PostgreSQL >= 12 when recoverytype=none. Withtype=none,recovery.signalis no longer written for PostgreSQL >= 12, which matches the behavior for earlier versions. -
Fix unique label generation for diff/incr backup. With at least two full backups and the latest expired, a diff or incr backup failed as if the clock had gone backward, because its label was compared with the label of the expired full backup.
-
Fix time-based archive expiration when no backups are expired. When time-based retention was met but no backups were expired, archive was not expired and "time-based archive retention not met" was logged. One more backup was then needed to expire the earlier WAL.
Core Improvements
-
Improve performance of SFTP storage driver. The SFTP storage driver waited for a fixed time when libssh2 could not continue. It now waits until the socket can be read or written.
-
Add timezone offset to
infocommand date/time output. Timestamps in theinfocommand output now include the timezone offset, so they can be used directly as a recovery target, e.g. with--target. -
Centralize error handling for unsupported features. Errors for features that were not compiled in, e.g. lz4, are now more detailed and consistent. Specifying SFTP storage when it was not compiled in no longer fails an assertion.
Core Development
-
Use new LibXML error handler.
-
Fix missed memory auditing in FUNCTION_LOG_RETURN_VOID().
-
Increase protocolServerError() logging to debug level.
-
Log when file size changes during backup.
-
Improve comments.
Documentation Improvements
- Clarify preference to install from packages in the user guide.
Documentation Development
-
Update the user guide, feature list, and NEWS.md.
-
Build u20 image to speed contributing document generation.
Test Development
-
Improve unit tests.
-
CI updates.
v2.46 — Block Incremental Backup and SFTP Storage
Released: 2023-05-22
Core Features
-
Block incremental backup. Block incremental stores only the parts of a file that changed since the prior backup, which saves space and time in diff and incr backups of large files. Enable it with
repo-block, which requiresrepo-bundle. -
SFTP support for repository storage. Set
repo-type=sftpandrepo-sftp-hostto store the repository on an SFTP server. -
PostgreSQL 16 support. Adds the catalog version and WAL magic number for PostgreSQL 16.
Core Improvements
-
Allow page header checks to be skipped. The page header checks made while verifying page checksums can report false errors for encrypted pages. Set
page-header-check=nto skip them. They are enabled by default. -
Avoid
chown()on recovery files during restore. Restore skippedchown()for restored files that already had the right owner but not for the recovery files it writes. The Posix driver now also skipschown()when the owner is already correct. -
Add error retry detail for HTTP retries. An error after HTTP retries now reports how many retries were made and for how long.
Core Development
-
Improve internal
manifestcommand. -
Improve object and allocation handling.
-
Refactor the lock and configuration load modules.
-
Sleep using nanosleep() instead of select().
-
Autogenerate PostgreSQL versions.
-
Update modules to recent coding standards.
-
Remove double spaces and extraneous whitespace.
Documentation Improvements
-
Add warning about using recovery
type=none. Recoverytype=nonedoes not increment the timeline at the end of recovery, which can cause PostgreSQL to archive duplicate WAL that is rejected and fills the disk, and can make tools likepg_rewindfail or corrupt the cluster. The documentation now warns against it. -
Add note about running
stanza-createon already-created repositories. Stanzas that already exist are skipped, sostanza-createis safe to run again, e.g. after a new repository is configured.
Documentation Development
- Update the user guide.
Test Development
-
Improve unit and integration tests.
-
CI updates.
v2.45 — Block Incremental Backup (BETA)
Released: 2023-03-20
Core Bug Fixes
- Skip writing
recovery.signalby default for restores of offline backups. On PostgreSQL >= 12,recovery.signalmakes PostgreSQL fail to start when the backup was made offline withwal_level=minimal. Restore now skips writing it for offline backups unlesstypeis set explicitly, e.g. for Point-in-Time Recovery from an offline backup made with a higherwal_level.
Core Features
- Block incremental backup (BETA). Block incremental stores only the parts of a file that changed since the prior backup instead of the entire file. Enable it with
repo-block, which requiresrepo-bundle. The feature is in beta and also requires thebetaoption. Do not use it in production: the on-disk format will change before the GA release.
Core Improvements
- Keep only one all-default group index. An option that does not apply, e.g.
repo2-s3-keywhenrepo2-typeis nots3, could add a phantom repository that has only default values. Repository and PostgreSQL indexes with only default values are now removed unless no other index remains.
Core Development
-
Add
pg-version-forceoption for fork integration. -
Add internal
manifestcommand. -
Use uncrustify for code formatting.
-
Improve error handling in build-code binary.
-
Improve interface handling in storage module.
-
Clean up code and comments.
-
Update config.guess and config.sub to latest versions.
Documentation Improvements
-
Add explicit instructions for upgrading between
2.xversions. A new user guide section explains that upgrading between2.xversions requires only installing the new binaries. Downgrading is also possible when no features unsupported by the older version were used. -
Remove references to SSH made obsolete when TLS was introduced. The help for
repo-host,pg-host, and their port options no longer refers to SSH as the only remote protocol. Details about SSH compression were also removed.
Documentation Development
- Fix contributors in release notes.
Test Development
- Improve unit tests.
v2.44 — Remove PostgreSQL 9.0/9.1/9.2 Support
Released: 2023-01-30
Core Improvements
-
Remove support for PostgreSQL
9.0/9.1/9.2. pgBackRest now supports ten versions of PostgreSQL: the five supported versions and the last five EOL versions. As of PostgreSQL 15 that excludes9.0,9.1, and9.2. -
Restore errors when no backup matches the current version of PostgreSQL. After a
stanza-upgradewith no new backup, restore used the latest backup, which was made from the prior PostgreSQL version. Replicas built this way could fail. Restore now errors in this case unlesssetortype=time/type=lsnis specified. -
Add
compress-levelrange checking for eachcompress-type. Thecompress-levelrange was0-9for everycompress-type. This is the range forgzbut a subset of whatlz4andzstallow. Each type now has its own range, e.g.-7to22forzst.
Core Development
-
Block-level incremental backup.
-
Add repository checksum to make verify and resume more efficient.
-
Add meson unity build and tests.
-
Refactor
common/inimodule to remove callbacks and duplicated code. -
Audit memory contexts returned from functions and fix leaks.
-
Improve libbacktrace implementation.
-
Fix error detail output to stderr.
-
Improve debug, check, and buffer macros.
-
Clean up code and comments.
-
Update LICENSE.txt and PostgreSQL copyright for 2023.
Documentation Improvements
-
Add warning about enabling "hierarchical namespace" on Azure storage. With "hierarchical namespace" enabled, Azure requires directories to be deleted separately and
expirefails. The user guide now warns not to enable it. -
Add replacement for linefeeds in monitoring example. The monitoring example failed when
infooutput contained a linefeed, e.g. in some error messages, becauseCOPYconverts\nto a linefeed thatjsonbrejects. The example now replaces linefeeds before converting tojsonb. -
Clarify
target-actionbehavior on various PostgreSQL versions. The effect ofpausedepends onhot_standbyand the PostgreSQL version. Withhot_standby=off,pauseacts likeshutdownon PostgreSQL >= 12 and likepromoteon earlier versions. -
Updates and clarifications to index page. The section about other backup solutions not supporting parallel processing was no longer accurate and has been reworded. Other sections were updated for current terminology and clarity.
-
Add dark mode to the website. The website uses dark colors when the browser prefers a dark color scheme.
Documentation Development
- Update RHEL user guide to PostgreSQL 11/12.
Test Development
-
Improve unit tests and test tools.
-
CI updates.
v2.43 — Bug Fix
Released: 2022-11-28
Core Bug Fixes
- Fix missing reference in diff/incr backup. In v2.42 a diff or incr backup failed with "unable to find '...' in string list" when its prior backup was made by an earlier version. The reference list built for a manifest from an earlier version now includes the backup's own label.
Core Improvements
- Add hint when an option is specified without an index. An option that requires an index, e.g.
repo-storage-ca-file, now errors with a hint that shows the indexed name, e.g.repo1-storage-ca-file. A deprecated option also gets a hint with its current name.
Core Development
- Update config.guess and config.sub to latest versions.
v2.42 — Bug Fixes
Released: 2022-11-22
Core Bug Fixes
-
Fix memory leak in file bundle
backup/restore. Restore freed some I/O objects for bundled files only after every file in the bundle was restored. With many small files in a bundle, memory use grew until restore failed with "unable to allocate". Backup had a similar, smaller leak when resuming. -
Fix protocol error on short read of remote file. A remote file read that stopped early or failed partway left the protocol in a bad state. The next command failed with "client state is 'data-get' but expected 'idle'" and the original error was lost. The rest of the file is now read when the file is closed.
Core Improvements
-
Do not store references for zero-length files when bundling. Bundled diff/incr backups stored a reference to a prior backup for zero-length files, which are not stored in any backup. The reference was ignored on restore but used space in the manifest.
-
Use more generic descriptions for
pg_start_backup()/pg_stop_backup(). PostgreSQL 15 renamed these functions topg_backup_start()/pg_backup_stop(). The logs and documentation now use descriptions that do not depend on the PostgreSQL version.
Core Development
-
Block incremental backup groundwork.
-
Move link creation to storage interface.
-
Do not log bundle info when a file is delta matched from a prior backup.
-
Return binary as result from CryptoHash filter.
-
Clean up code and comments.
-
Finalize catalog number for PostgreSQL 15 release.
-
Update config.guess and config.sub to latest versions.
Documentation Development
- Add missed release note for v2.41.
Test Improvements
- Update
test.pl--psql-binoption to match command-line help. The help showed--psql-binbut the option was named--pgsql-bin. The option now has the name shown in the help.
Test Development
-
Improve unit tests and test tools.
-
CI updates.
v2.41 — Backup Annotations
Released: 2022-09-19
Core Bug Fixes
-
Fix incorrect time expiration being used for non-default repositories. When
expireran withoutrepo, the time-basedrepo-retention-fullfor every repository was read from the lowest-numbered repository. Each repository now uses its own value. -
Fix issue when listing directories recursively with a filter.
repo-lswithrecurseandfiltercould fail with a double free or segfault when the last entry in a directory was a directory that had entries. A parent list was freed before the entries of its subdirectories were processed.
Core Features
- Backup key/value annotations. Add key/value annotations to a backup with the
annotationoption of thebackupcommand, and add, modify, or remove them later with the newannotatecommand. Theinfocommand shows annotations in text output whensetis specified and always includes them in JSON output.
Core Improvements
-
Support
--setin JSON output forinfocommand. Withset, JSON output frominfonow includes the details that text output already showed, e.g. the error and tablespace lists. -
Allow upload chunk size to be configured for object stores. Set
repo-storage-upload-chunk-sizeto change the size of each upload chunk for S3, GCS, or Azure. Larger chunks can improve performance but use more memory. The defaults are unchanged. -
Update archive.info timestamps after a successful backup.
archive.infoand its copy were written only bystanza-createandstanza-upgrade, and an object store lifecycle policy that expires old files could remove them. Their timestamps are now updated after each successful backup. -
Move standby timeline check after checkpoint. The check that the standby is on the expected timeline used
pg_controlas it was before the backup started. Right after a promotion the standby may not have written the new timeline topg_controlyet, and the backup failed with "standby is on timeline ... but expected ...". The check now runs after the checkpoint. -
Improve warning message on backup resume. The warning read as if the user needed to take action. It now states that invalid files will be removed and then the backup will resume.
Core Development
-
Skip mem context cleanup in
CATCH_FATAL()block. -
Do not allow
CATCH()to catch a fatal error. -
Add
FN_INLINE_ALWAYSmacro. -
Clear ProtocolClient callback after connection error.
-
Improve the code builder.
-
Update config.guess to latest version.
Documentation Improvements
- Add absolute path for
killinpgbackrest.service. Thepgbackrest.serviceexample now uses/bin/killinExecReload. Older versions of systemd require an absolute path.
Documentation Development
-
Allow host memory limits in the user guide to be disabled.
-
Add missed reviewer to the release notes.
Test Development
-
Build unit and performance tests with the C test harness.
-
Improve unit tests and test tools.
-
Update Minio test/documentation container version.
-
CI updates.
v2.40 — OpenSSL 3 Support
Released: 2022-07-18
Core Improvements
-
OpenSSL 3 support. pgBackRest now builds with OpenSSL 3. Deprecation warnings are suppressed, and an unexpected EOF is detected with the error codes that OpenSSL 3 reports.
-
Create snapshot when listing contents of a path. A path listed without sorting was read while its entries were processed. When files were deleted during the listing, some filesystems skipped files that still existed and the path could not be removed. Listings now always use a snapshot of the path.
-
Force
target-timeline=currentwhen restoretype=immediate. On PostgreSQL >= 12 the default target timeline islatest, and recovery could fail when the latest timeline in the repository cannot be reached from the backup. Restore withtype=immediatedoes not change timelines, so it now sets the target timeline tocurrent. -
Truncate files during delta
restorewhen they are larger than expected. Delta restore copied a file from the repository whenever its size differed from the manifest. A larger file is now truncated to the size in the manifest and copied only when its checksum does not match. Files that were only appended to, e.g. logs, are no longer copied. -
Disable incremental manifest save when
resume=n. During a backup the manifest is saved periodically for use by resume. These saves are now skipped whenresume=n. -
Set backup percent complete to zero before copy start. The progress of a running backup was not reported until the first file was copied. It is now set to zero when copying starts.
-
Use S3
IsTruncatedflag to determine list continuation. Recent versions of Scality send an emptyNextContinuationTokenwhen a list is not truncated, which caused an infinite loop. TheIsTruncatedflag now determines whether a list continues, and a missing or empty token for a truncated list is an error.
Core Development
-
Automatically create PostgreSQL version interfaces.
-
Improve memory usage of mem contexts.
-
Add
FN_NO_RETURNmacro. -
Add cast to handle compilers (e.g. MSVC) that coerce to signed int.
-
Fix hard-coded WAL size assertion in
walSegmentNext(). -
Add labels in parse.auto.c to make diffs easier to read.
-
Fix repository option definitions for the backup and stanza commands.
-
Use storagePathP() instead of cfgOptionStr() to get base repo path.
-
Add additional detail to warnings when delta checksum is auto-enabled.
-
Clean up code and comments.
-
Replace AC_PROG_CC_C99 configure macro with AC_PROG_CC.
-
Update config.guess to latest version.
Documentation Bug Fixes
- Skip internal options in the configuration reference. Options that are internal only for some commands were listed in the configuration reference. The command-line help was not affected.
Documentation Improvements
- Add link to PostgreSQL configuration in repository host section.
Documentation Development
-
Fix RHEL container build for documentation.
-
Update release notes.
Test Improvements
-
Add experimental Meson build. Meson has simpler syntax and better performance than autoconf/make. It is used for code generation and test builds, and errors on anything but a debug build. Packagers should continue to use autoconf/make.
-
Allow any path to be passed to the
--test-pathoption. -
Fix compile error when
DEBUG_EXEC_TIMEis defined withoutDEBUG. WithoutDEBUGtheASSERT()that used the start time expanded to nothing, and the unused variable caused a compile error. The check now usesCHECK().
Test Development
-
Add experimental unit test harness written in C.
-
Improve unit and integration tests.
-
CI updates.
v2.39 — Verify and File Bundling
Released: 2022-05-16
Core Bug Fixes
-
Fix error thrown from
FINALLY()causing an infinite loop. An error thrown in aFINALLY()block returned to the same block, where the error was likely thrown again and caused an infinite loop.FINALLY()now runs only once. -
Error on all lock failures except another process holding the lock.
archive-get/archive-pushdid not error when the lock could not be taken for another reason, e.g. permissions, and the async process was not launched. The user got a generic failure message and there was no async log. These failures are now errors.
Core Features
-
Backup file bundling for improved small file support. Bundling stores small files together in the repository to save time and space during backup, especially on object stores where creating each file is expensive. Enable it with
repo-bundleand tune it withrepo-bundle-sizeandrepo-bundle-limit. Restore reads adjacent files in a bundle with a single read. -
Verify command to validate the contents of a repository. The
verifycommand checks that the backups and WAL in the repository are valid. Setoutput=textto print the results andverboseto include what was verified successfully along with errors. -
PostgreSQL 15 support. PostgreSQL 15 removes exclusive backup, renames the backup start/stop functions, and drops
pg_database.datlastsysoid, which pgBackRest no longer uses. -
Show backup percent complete in
infooutput.infoshows the percent complete of a running backup on the host where the backup is running. JSON output reports it as an integer, the percent times 100. -
Auto-select backup for
restorecommand--type=lsn. Withtype=lsn, restore now selects the most recent backup that stopped at or before thetargetLSN. -
Suppress existing WAL warning when
archive-mode-checkis disabled. Witharchive-mode-check=nand WAL pushed from multiple hosts, a WAL file already in the archive with the same checksum is expected and no longer logs a warning. A different checksum is still an error. -
Add AWS IMDSv2 support. IMDSv2 protects the instance metadata that provides credentials for
repo-s3-key-type=auto. pgBackRest falls back to IMDSv1 when the IMDSv2 token request fails.
Core Improvements
-
Allow
repo-hardlinkoption to be changed after full backup. Changingrepo-hardlinkrequired a new full backup. It can now be changed at any time, e.g. to disable it for file bundling. -
Increase precision of percent complete logging for
backupandrestore. Percent complete is now logged with hundredths, which gives more frequent updates for large backups and restores. -
Improve path validation for
repo-*commands. A path may not contain//, a trailing/is removed, and an absolute path must be in the repository path. -
Improve
stopcommand to honorstanzaoption.stopwithforceandstanzanow terminates only the processes holding locks for that stanza. Before, it terminated processes for all stanzas. -
Improve error message for invalid
repo-azure-key. Withrepo-azure-key-type=shared,repo-azure-keyis now checked for valid base64. -
Add hint to check the log on
archive-get/archive-pushasync error. When the async process cannot write its status files,archive-get/archive-pushtimes out with a generic error. The error now includes a hint with the path of the async log, which contains the actual error. -
Add
ClockErrorfor unexpected clock skew and timezone changes. -
Strip extensions from history manifest before showing in error message. When a new backup label was not later than the latest label from the backup history, the error showed the history manifest name, e.g.
20220504-222042F_20220504-222141I.manifest.gz. It now shows only the label. -
Add user:group to lock permission error.
-
Add hint when unable to find the primary cluster. The "unable to find primary cluster" error now includes a hint asking whether all available clusters are in recovery.
Core Development
-
Improve JSON handling.
-
Add default for boolean options with unresolved dependencies.
-
Lock module refactoring.
-
Prevent
memContextFree()from freeing memory needed by callbacks. -
Refactor
PgClientto return results inPackformat. -
Fix undefined behavior found by sanitizers.
-
Fix memory leaks and improve memory context usage.
-
Add and improve macros.
-
Add and improve string functions.
-
Refactor remote storage protocol to use Packs instead of JSON.
-
Fix reported error line number when ini key length is zero.
-
Clean up code and comments.
-
Update config.guess and config.sub to latest versions.
Documentation Bug Fixes
-
Fix incorrect reference to
stanza-updatein the user guide. -
Fix example for
repo-gcs-key-typeoption in configuration reference. The example wasnone, which is not a valid value. It is nowauto. -
Fix
tls-server-authexample and add clarifications. The example was missing the client CN and is nowclient-cn=stanza1. The help also states that wildcards are not allowed for the client CN.
Documentation Improvements
-
Simplify messaging around supported versions in the documentation. The user guides listed PostgreSQL version ranges, which made it look like other versions were not supported, e.g. PostgreSQL 12 on RHEL. The ranges were removed and the introduction now explains which versions the user guides cover.
-
Add option type descriptions. The configuration reference now describes each option type, e.g. the units for size options, rather than repeating the description for each option.
-
Add FAQ about backup types and restore speed. A new FAQ explains that the backup type affects only the backup and not how fast a restore runs.
-
Document required base branch for pull requests. The contributing guide now states that pull requests must be based on the
integrationbranch.
Documentation Development
- Fix typos and formatting in the documentation and help.
Test Development
-
Remove integration expect log testing.
-
Improve unit tests and test tools.
-
CI updates.
v2.38 — Minor Bug Fixes and Improvements
Released: 2022-03-06
Core Bug Fixes
-
Retry errors in S3 batch file delete. A failed batch delete was retried, but errors for individual files in the batch were not, and pgBackRest could terminate during expire or when removing a backup that could not be resumed. Files that fail in a batch are now deleted individually with the usual HTTP retries.
-
Allow case-insensitive matching of HTTP
connectionheader values. The HTTP specification allowsconnectionheader values in any case, e.g.Close.
Core Features
-
Add support for AWS S3 server-side encryption using KMS. Set
repo-s3-kms-key-idto encrypt objects with a key managed by AWS KMS. -
Add
archive-missing-retryoption. By defaultarchive-getretries a WAL segment it already reported as missing, which ignores missing notifications left in the spool path by a prior restore. Witharchive-missing-retry=n, PostgreSQL can detect the end of the archive and switch to streaming even while WAL is being archived. The spool path must then be empty when recovery starts. -
Add backup type filter to
infocommand. Settypeto show only backups of that type, e.g.type=full.
Core Improvements
-
Retry on page validation failure during
backup. A page that fails checksum validation is now read again. It is reported as an error only when it has not changed. A changed page is being written by PostgreSQL, and the WAL contains a full page image. Zero pages are now checked to be all zeroes rather than only by thepd_upperfield. -
Handle TLS servers that do not close connections gracefully. Some servers close the socket rather than the TLS connection. When a response has no content length or chunked encoding and its content can be parsed, the closed socket is now treated as EOF. These servers stopped working in v2.35.
-
Add backup LSNs to
infocommand output. The start and stop LSNs of a backup are shown withsetand in JSON output, for use with LSN-based Point-in-Time Recovery. -
Automatically strip trailing slashes for
repo-lspaths. A trailing slash on the path maderepo-lsshow no content on some repository storage types. -
Do not retry fatal errors. Retrying fatal errors, especially out of memory errors, may cause lockups. Assertion and memory errors are now reported without retrying.
-
Remove support for PostgreSQL
8.3/8.4. There is no evidence that these versions are still in use and supporting them costs development and test time. Use an older version of pgBackRest to back up or migrate from these versions. -
Remove logic that tried to determine additional file system compression. After a file was copied, pgBackRest checked its size on disk to detect compression by the file system, e.g. ZFS. This was untested, slow with many small files, and blocked file bundling. The repository size in
infois now what pgBackRest wrote.
Core Development
-
Disconnect
help.auto.cfrombuild-helpinMakefile. -
Improve small file support.
-
Refactor lock code.
-
Configuration refactoring.
-
Add XML to invalid XML error message.
-
Fix invalid file descriptor being passed to close().
-
Add ioCopy().
-
Clean up code and comments.
-
Update config.guess and config.sub to latest versions.
Documentation Bug Fixes
-
Move
repooptions in TLS documentation to theglobalsection. The user guide set these options in the stanza section, which works in some cases but is not best practice. -
Remove unused
backup-standbyoption from stanza commands.stanza-createandstanza-upgradelistedbackup-standbyin the command reference and help, but did not use it. -
Fix typos in help and release notes.
Documentation Improvements
-
Add aliveness check to systemd service configuration. The
pgbackrest.serviceexample now checks that the server is still running shortly after it starts. Before, a server that failed to start reported no error while systemd retried in the background. -
Add FAQ explaining WAL archive suffix. The suffix on a WAL file in the repository is its SHA1 checksum, which is used to verify the file. It cannot be omitted.
-
Note that replications slots are not restored.
Documentation Development
-
Update the user guide.
-
Improve the documentation build.
-
Update the release notes and NEWS.md.
Test Development
-
Improve unit tests.
-
CI updates.
v2.37 — TLS Server
Released: 2022-01-03
Core Bug Fixes
-
Fix
restoredelta link mapping when path/file already exists. Whenlink-maporlink-allmapped a path or file that already existed to a link, a delta restore left the existing path or file in place. It is now replaced by the link. -
Fix socket leak on connection retries. In optimized builds the socket of a failed connection attempt was not closed, and each retry leaked a socket.
Core Features
-
Add TLS server. The
servercommand starts a TLS server that can be used instead of SSH to reach repository and PostgreSQL hosts. Setrepo-host-type=tlsorpg-host-type=tlson the client, and configure certificates and client authorization with thetls-server-*options.SIGHUPreloads the configuration andSIGTERMstops the server. -
Add
--cmdoption. Setcmdto the pgBackRest executable used in commands that pgBackRest writes, e.g.restore_commandinrecovery.conf.
Core Improvements
-
Check archive immediately after backup start. A backup failed because WAL archiving was not working only after all files were copied. The archive is now checked right after the backup starts. On an idle system a restore point is created to switch the WAL segment.
-
Add timeline and checkpoint checks to backup. The backup now checks that
pg_controlhas the checkpoint and timeline of the backup start, and that a standby is following the primary, i.e. it is on the same timeline and its checkpoint is not later than the backup checkpoint. -
Check that clusters are alive and correctly configured during a backup. A backup now fails as soon as a cluster stops or the standby is promoted. Before, a stopped primary was detected only at the end of the backup and a promoted standby was not detected.
-
Error when
restoreis unable to find a backup to match the time target. This was a warning that was easy to miss, and a lot of time could be lost restoring a backup that cannot reach the target. -
Parse protocol/port in S3/Azure endpoints.
repo-s3-endpoint,repo-azure-endpoint, andrepo-storage-hostmay now include a protocol and port, e.g.https://host:9000. -
Add warning when
checkpoint_timeoutexceedsdb-timeout. Withstart-fast=n, a backup can time out waiting for the checkpoint whencheckpoint_timeoutis greater thandb-timeout. The backup now warns in this case. -
Add verb to HTTP error output.
-
Allow y/n arguments for boolean command-line options.
-
Make backup size logging exactly match
infocommand output. The logged backup size now includes only the files copied, plusbackup_labelandtablespace_map. Before, e.g. an incremental backup after a switchover logged the size of every file checked.
Core Development
-
Simplify error handler.
-
Add
StringIdas an option type. -
Do not delete manifests individually during stanza delete.
-
Add error type and message to CHECK() macro.
-
Clean up and refactor code.
-
Update LICENSE.txt and PostgreSQL copyright for 2022.
Documentation Improvements
-
Display size option default and allowed values with appropriate units.
-
Fix typos and improve documentation for the
tablespace-map-alloption. -
Remove obsolete statement about future multi-repository support. The documentation stated that only one repository was allowed, but multiple repositories have been supported since v2.33.
Documentation Development
-
Update the user guide.
-
Update the release notes and RELEASE.md.
Test Development
- Improve unit and performance tests.
v2.36 — Minor Bug Fixes and Improvements
Released: 2021-11-01
Core Bug Fixes
-
Allow "global" as a stanza prefix. A stanza name that begins with
global, e.g.global_stanza, was rejected because the config parser treated it as a global section. -
Fix segfault on invalid GCS key file. A GCS key file without the client email, private key, or token URI caused a segfault. It now causes an error.
Core Improvements
-
Allow
link-mapoption to create new links.link-mapcould only remap links that were in the backup. It can now create a new link for any path or file in the backup. -
Increase max index allowed for
pg/repooptions to 256. The maximum index was 8 forpgoptions and 4 forrepooptions. Both are now 256, e.g.pg256-path. -
Add
WebIdentityauthentication for AWS S3. Setrepo-s3-key-type=web-idto get credentials automatically in an EKS environment. -
Add
repo-azure-uri-styleoption. Setrepo-azure-uri-styletohost(default) orpathto select the URI style for Azure. Azurite uses host-style URIs when the endpoint looks like a multipart host name. -
Report backup file validation errors in
backup.info. Errors found during a backup, e.g. invalid page checksums, were shown only byinfowithset. A flag inbackup.infonow shows in text and JSON output that a backup has errors. The details still requireset. -
Add recovery start time to online backup restore log. Restore now logs the time that recovery will start from, which shows how much WAL must be replayed.
-
Report original error and retries on local job failure. When a local job fails after its retries, the error now reports the first error with its stack trace, followed by the retry errors. Before, only the last error was reported, which was often a cascade failure such as the protocol being out of sync.
-
Rename page checksum error to error list in info text output. The label in
infotext output is now "error list" rather than "page checksum error". A file may have an alignment error rather than a page checksum error. -
Add hints to standby replay timeout message. The timeout waiting for the standby to replay now has hints to check that replication is running and to disable
backup-standbyto back up from the primary.
Core Development
-
Add TLS server.
-
Store config values as a union instead of a variant.
-
Migrate command-line help generation to C.
-
Improve the Pack type and use it for filters and configuration rules.
-
Simplify configuration rules.
-
Improve memory allocation and mem context handling.
-
Add configurable storage helpers to create repository storage.
-
More efficient generation of diff/incr backup label.
-
Add -Werror -Wfatal-errors -g flags to configure --enable-test.
-
Add required header for Illumos.
-
Clean up code and comments.
-
Finalize catalog number for PostgreSQL 14 release.
-
Update config.guess and config.sub to latest versions.
Documentation Bug Fixes
- Fix incorrect host name in user guide. The replication setup used the IP address of
pg-primaryinpg_hba.confrather than the IP address ofpg-standby.
Documentation Improvements
- Improve option documentation. The help for
buffer-sizenow describes all the operations that use it, the descriptions ofcmd-ssh,repo-host-cmd, andpg-host-cmdare consistent, andarchive-header-checkmoved to the archive section of the configuration reference.
Documentation Development
-
Eliminate linefeed formatting from documentation.
-
Update the user guide and documentation build.
-
Add analytics to the HTML documentation.
-
Update the index page, README.md, and contributing documentation.
Test Development
-
Improve unit tests and test tools.
-
CI updates.
v2.35 — Binary Protocol
Released: 2021-08-23
Core Bug Fixes
-
Detect errors in S3 multi-part upload finalize. Completing a multi-part upload can fail even when S3 returns HTTP success. A response without an
ETagis now treated as a failure, and the job is retried. -
Fix detection of circular symlinks. Links were followed before they were checked, and a circular link sent the manifest build into endless recursion and a crash.
-
Only pass selected
repooptions to the remote. Options for other repositories could cause conflicts on the remote, which uses exactly one repository.
Core Improvements
-
Binary protocol. Local and remote processes now communicate with the binary pack format rather than JSON. Packs are more compact, faster to render and parse, and strictly typed. Each message is written in one place, which makes an error less likely to leave the protocol in a bad state, and messages have no size limit.
-
Automatically create data directory on
restore. A check migrated from Perl prevented restore from creating the data directory. -
Allow
restore--type=lsn. Settype=lsnand an LSN intargetto recover to an LSN on PostgreSQL >= 10. -
Change level of
backup/restorecopied file logging to detail. This makes theinfolog level less noisy. Set the log level todetailto see each copied file. -
Loop while waiting for checkpoint LSN to reach replay LSN. On a standby the checkpoint LSN can lag slightly behind the replay LSN until
pg_controlis updated. The backup now keeps checking rather than failing. -
Log
backupfile total andrestoresize/file total. The backup size is now logged at the end of the backup and includes files added to the manifest after the main copy, e.g.backup_labeland WAL. Restore now logs its size and file total.
Core Development
-
Add support for more
Packtypes. -
Clear error when a
CATCH()block finishes. -
Migrate config and error code generation to C.
-
Fix miscalculation in time option command defaults.
-
Refactor local/remote startup.
-
Fix infinite loop in
protocolServerProcess()on error. -
Add temp mem context reset blocks in job processing loops.
-
Clean up code and comments.
-
Update config.guess and config.sub to latest versions.
Documentation Bug Fixes
- Fix incorrect host names in user guide. Some examples showed
pg1rather than the host name, and the install block installed packages on the build host no matter which host was specified.
Documentation Improvements
-
Update contributing documentation and add pull request template. The contributing guide now has a table of contents and sections on understanding test output and submitting a pull request. GitHub now shows a template for new pull requests.
-
Rearrange backup documentation in user guide. The "Fast Start Option" and "Archive Timeout" sections moved to "Quick Start - Perform Backup". The "Automatic Stop Option" section, which applies only to PostgreSQL <= 9.6, was removed.
-
Clarify
restore--typebehavior in command reference. The reference now states thatsetmust be specified when the target is before the latest backup andtypeis nottime. -
Fix documentation and comment typos.
Documentation Development
-
Add optional stress test section to the user guide.
-
Add linefeeds around content even when not in pretty mode.
Test Improvements
-
Add check for test path inside repo path. A test path inside the repository path caused strange failures because the repository is copied into the test path.
test.plnow errors in this case. -
Add CodeQL static code analysis. CodeQL now runs in CI. Issues it found were fixed, e.g.
gmtime()/localtime()were replaced withgmtime_r()/localtime_r(). -
Update tests to use standard patterns.
Test Development
-
Improve test harness macros.
-
Improve unit tests and test tools.
-
CI updates.
v2.34 — PostgreSQL 14 Support
Released: 2021-06-07
Core Bug Fixes
-
Fix issues with leftover spool files from a prior
restore. A notification left in the spool path by a prior restore could makearchive-getreport a WAL segment as missing. When this notification is found on the first check, it is now removed and the async process is run again. An error is reported when the async process does not respond, rather than reporting the WAL segment as missing. -
Fix issue when checking links for large numbers of tablespaces. The link check used a lot of memory with many tablespaces and could crash. The new check is much faster, uses far less memory, and also detects duplicate file links.
-
Free no longer needed remotes so they do not timeout during
restore. The connections to remotes were held for the whole restore and could time out, which logged a harmless but distracting warning at the end of a long restore. They are now closed after the manifest is loaded. -
Fix
helpwhen a valid option is invalid for the specified command.helpsegfaulted when asked about an option that is not valid for the command.
Core Features
-
Add PostgreSQL 14 support. PostgreSQL 14 needs no code changes from PostgreSQL 13. The catalog version may now change during the PostgreSQL beta/rc period without requiring a new pgBackRest release.
-
Add automatic GCS authentication for GCE instances. Set
repo-gcs-key-type=autoto get the authentication token from the instance metadata on a GCE instance. -
Add
repo-retention-historyoption to expire backup history. Set the number of days of backup history to keep. By default all history is kept, and history for backups still in the repository is never expired. When a full backup manifest expires, the manifests of its differential and incremental backups expire as well. -
Add
db-excludeoption. Restore excludes the specified databases by writing them as sparse, zeroed files. PostgreSQL can still perform recovery, and the databases can be dropped after recovery. Withdb-include,db-excludeapplies only to the system databasestemplate0,template1, andpostgres.
Core Improvements
-
Change archive expiration logging from detail to info level.
-
Remove stanza archive spool path on
restore. Files in the spool path could interfere with the new cluster, e.g. oldarchive-pushacknowledgements could make it skip archiving WAL. -
Do not write files atomically or sync paths during
backupcopy. Atomic writes are not needed since checksums are validated when a failed backup is resumed, and all paths are synced at the end of the backup.
Core Development
-
Replace
getopt_long()with custom implementation. -
Add help for all internal options valid for default roles.
-
Add
StringIdtype. -
Add local process shim.
-
Add
cfgOptionDisplay()/cfgOptionIdxDisplay(). -
Revert to checking catalog version for all PostgreSQL versions.
-
Rename default command role to main.
-
Simplify defaults for
--forceoption. -
Refactor modules with inline getters/setters.
-
Clean up code and comments.
-
Update config.sub to latest version.
Documentation Improvements
-
Update contributing documentation. The contributing guide has more examples of how to write code, add configuration options, and test.
-
Consolidate RHEL/CentOS user guide into a single document. The second guide existed mainly to document
stop-autofor PostgreSQL <= 9.5, which is now EOL. The option is still documented in the reference. -
Clarify that
repo-s3-roleis not anARN.
Documentation Development
- Update the user guide and release documentation.
Test Development
-
Improve test harness macros.
-
Improve unit tests and test tools.
-
CI updates.
v2.33 — Multi-Repository and GCS Support
Released: 2021-04-05
Core Bug Fixes
-
Fix option warnings breaking async
archive-get/archive-push. An option warning in the async process was logged to a closed stdout, which made the process abort. Since the async role can now have different valid options than the default role, this happened more often. Option warnings are now logged only for the default role. -
Fix memory leak in backup during archive copy. Copying WAL into the backup with
archive-copyleaked memory, especially when the WAL needed to be recompressed. -
Fix stack overflow in cipher passphrase generation. The buffer for the generated passphrase had no room for the terminating zero. This was found on arm64 with musl libc.
-
Fix
repo-ls/on S3 repositories. S3 reports/as a file without the expected headers, which caused an error./is now reported as not existing on storage that does not support paths.
Core Features
-
Multiple repository support. Up to four repositories may be configured, e.g. a local repository for fast restores and a remote repository for redundancy.
archive-pushpushes WAL to all repositories, and backups are scheduled for each repository. Some commands work with all repositories, while others requirerepo.repois not required when onlyrepo1is configured. -
GCS support for repository storage. Set
repo-type=gcsto store the repository on GCS or a GCS-compatible object store. -
Add
archive-header-checkoption. The WAL header is checked against the PostgreSQL version and system identifier to make sure WAL is pushed to the correct stanza. The check is enabled by default and can be disabled when needed, e.g. for encrypted WAL.
Core Improvements
-
Include recreated system databases during selective restore. A system database (
template0,template1, orpostgres) that was recreated has an OID that makes it look like a user database. These databases are now always restored, whatever their OID. -
Exclude
content-lengthfrom S3 signed headers. Some proxies modify thecontent-lengthheader, which made authentication fail when it was signed. -
Consolidate less commonly used repository storage options. The S3 and Azure CA, host, port, and TLS verification options are renamed to
repo-storage-*, e.g.repo1-s3-hostis nowrepo1-storage-host. The old names are still accepted. -
Allow custom
config-pathdefault with./configure --with-configdir. Packagers can set a different default forconfig-pathwhen building. Without the option the default is still/etc/pgbackrest. -
Log archive copy during
backup.
Core Development
-
Improve protocol handlers.
-
Add
HttpUrlobject. -
Move configuration definition to
src/build/config/config.yaml. -
Improve storage drivers.
-
Improve the configure script.
-
Update help.auto.c missed in prior commits.
-
Clean up code and comments.
-
Update config.guess and config.sub to latest versions.
Documentation Improvements
-
Update reference to include links to user guide examples. The command reference now links to the user guide sections with examples, and some descriptions were clarified, e.g.
setforexpire. -
Update selective restore documentation with caveats. Recovery may fail unless
type=immediateis specified, because PostgreSQL reports zeroed pages as errors after consistency is reached. On PostgreSQL >= 13ignore_invalid_pagesmay be used, but check the logs for invalid pages in the selected databases. -
Add
compress-typeclarification toarchive-copydocumentation. WAL must be recompressed whenarchive-pushandbackupuse a differentcompress-type, which can be expensive. -
Add
compress-leveldefaults percompress-typevalue. The defaults are 9 forbz2, 6 forgz, 1 forlz4, and 3 forzst. -
Add note about required NFS settings being the same as PostgreSQL.
Documentation Development
-
Fix option validity by role and make sections conform to C help.
-
Improve the documentation build and release notes.
Test Development
- Improve unit tests and test tools.
v2.32 — Repository Commands
Released: 2021-02-08
Core Bug Fixes
- Fix resume after partial delete of backup by prior resume.
Core Features
-
Add
repo-lscommand. -
Add
repo-getcommand. -
Add
archive-mode-checkoption.
Core Improvements
- Improve
archive-getperformance.
Core Development
-
Partial multi-repository implementation.
-
Add backup verification to internal verify command.
-
Add
packtype. -
Allow option validity to be determined by command role.
-
Add
job-retryandjob-retry-intervaloptions. -
Replace
doubletype withtimeinconfigmodule.
Documentation Improvements
- Improve
expirecommand documentation.
v2.31 — Minor Bug Fixes and Improvements
Released: 2020-12-07
Core Bug Fixes
-
Allow
[,#, andspaceas the first character in database names. -
Create
standby.signalonly on PostgreSQL 12 whenrestoretype isstandby.
Core Features
-
Expire history files.
-
Report page checksum errors in
infocommandtextoutput. -
Add
repo-azure-endpointoption. -
Add
pg-databaseoption.
Core Improvements
-
Improve
infocommand output when a stanza is specified but missing. -
Improve performance of large file lists in
backup/restorecommands. -
Add retries to PostgreSQL sleep when starting a backup.
Core Development
-
Prepare configuration module for multi-repository support.
-
Optimize small reads in
IoRead. -
Allow multiple remote locks from the same main process.
-
Conform retry in
lockAcquireFile()to the common retry pattern. -
Assert when buffer used is greater than size limit.
Documentation Improvements
- Replace RHEL/CentOS 6 documentation with RHEL/CentOS 8.
v2.30 — PostgreSQL 13 Support
Released: 2020-10-05
Core Bug Fixes
- Error with hints when backup user cannot read
pg_settings.
Core Features
- PostgreSQL 13 support.
Core Improvements
-
Improve PostgreSQL version identification.
-
Improve working directory error message.
-
Add hint about starting the stanza when WAL segment not found.
-
Add hint for protocol version mismatch.
Core Development
-
Add internal verify command.
-
Allow
ProtocolParallelto complete with no jobs.
Documentation Improvements
-
Add note that pgBackRest versions must match when running remotely.
-
Move info command text to the reference and link to user guide.
-
Update yum repository path for CentOS/RHEL user guide.
v2.29 — Auto S3 Credentials on AWS
Released: 2020-08-31
Core Bug Fixes
-
Suppress errors when closing
local/remoteprocesses. Since the command has completed it is counterproductive to throw an error but still warn to indicate that something unusual happened. -
Fix issue with
=character in file or database names.
Core Features
-
Automatically retrieve temporary S3 credentials on AWS instances.
-
Add
archive-modeoption to disable archiving on restore.
Core Improvements
-
PostgreSQL 13 beta3 support. Changes to the control/catalog/WAL versions in subsequent betas may break compatibility but pgBackRest will be updated with each release to keep pace.
-
Asynchronous
list/removefor S3/Azure storage. -
Improve memory usage of unlogged relation detection in manifest build.
-
Proactively close file descriptors after forking async process.
-
Delay backup remote connection close until after archive check.
-
Improve detailed error output.
-
Improve TLS error reporting.
Core Development
-
Allow
HttpClient/HttpSessionto work on plain sockets. -
Add support for
HTTP/1.0. -
Add general-purpose statistics collector.
-
Add
user-agentto HTTP requests.
Documentation Bug Fixes
-
Add
nonetocompress-typeoption reference and fix example. -
Add missing
azuretype inrepo-typeoption reference. -
Fix typo in
repo-cipher-typeoption reference.
Documentation Improvements
- Clarify that
expiremust be run regularly whenexpire-autois disabled.
v2.28 — Azure Repository Storage
Released: 2020-07-20
Core Bug Fixes
- Fix
restore--forceacting like--force --delta. This causedrestoreto replace files based on timestamp and size rather than overwriting, which meant some files that should have been updated were left unchanged. Normalrestoreandrestore--deltawere not affected by this issue.
Core Features
-
Azure support for repository storage.
-
Add
expire-autooption. This allows automatic expiration after a successful backup to be disabled.
Core Improvements
-
Asynchronous S3 multipart upload.
-
Automatic retry for
backup,restore,archive-get, andarchive-push. -
Disable query parallelism in PostgreSQL sessions used for backup control.
-
PostgreSQL 13 beta2 support. Changes to the control/catalog/WAL versions in subsequent betas may break compatibility but pgBackRest will be updated with each release to keep pace.
-
Improve handling of invalid HTTP response status.
-
Improve error when
pg1-pathoption missing forarchive-getcommand. -
Add hint when checksum delta is enabled after a timeline switch.
-
Use PostgreSQL instead of
postmasterwhere appropriate.
Core Development
-
Automatically determine cipher passphrase in
repo-getcommand. -
Fix expression when recursion enabled in
storageInfoListP(). -
Improve behavior of the
repo-lscommand. -
Inline
strPtr()to increase profiling accuracy. -
Add
pgLsnFromWalSegment().
Documentation Bug Fixes
-
Fix incorrect example for
repo-retention-full-typeoption. -
Remove internal commands from HTML and man command references.
Documentation Improvements
-
Update PostgreSQL versions used to build user guides. Also add version ranges to indicate that a user guide is accurate for a range of PostgreSQL versions even if it was built for a specific version.
-
Update FAQ for expiring a specific backup set.
-
Update FAQ to clarify default PITR behavior.
Test Development
-
Remove
real/allintegration tests now covered by unit tests. -
Rename most instances of master to primary in tests.
v2.27 — Expiration Improvements and Compression Drivers
Released: 2020-05-26
Core Bug Fixes
-
Fix issue checking if file links are contained in path links.
-
Allow
pg-path1to be optional for synchronousarchive-push. -
The
expirecommand now checks if a stop file is present. -
Handle missing reason phrase in HTTP response.
-
Increase buffer size for lz4 compression flush.
-
Ignore
pg-host*andrepo-host*options for theremotecommand. -
Fix possibly missing
pg1-*options for theremotecommand.
Core Features
-
Time-based retention for full backups. The
--repo-retention-full-typeoption allows retention of full backups based on a time period, specified in days. -
Ad hoc backup expiration. Allow the user to remove a specified backup regardless of retention settings.
-
Zstandard compression support. Note that setting
compress-type=zstwill make new backups and archive incompatible (unrestorable) with prior versions of pgBackRest. -
bzip2 compression support. Note that setting
compress-type=bz2will make new backups and archive incompatible (unrestorable) with prior versions of pgBackRest. -
Add
backup/expirerunning status to theinfocommand.
Core Improvements
-
Expire WAL archive only when
repo-retention-archivethreshold is met. WAL prior to the first full backup was previously expired after the first full backup. Now it is preserved according to retention settings. -
Add local MD5 implementation so S3 works when FIPS is enabled.
-
PostgreSQL 13 beta1 support. Changes to the control/catalog/WAL versions in subsequent betas may break compatibility but pgBackRest will be updated with each release to keep pace.
-
Reduce
buffer-sizedefault to1MiB. -
Throw user-friendly error if
expireis not run on repository host.
Core Development
- Enforce non-null for most string options.
v2.26 — Non-blocking TLS
Released: 2020-04-20
Core Bug Fixes
- Remove empty subexpression from manifest regular expression. MacOS was not happy about this though other platforms seemed to work fine.
Core Improvements
-
Non-blocking TLS implementation.
-
Only limit backup copy size for WAL-logged files. The prior behavior could possibly lead to
postgresql.conforpostgresql.auto.confbeing truncated in the backup. -
TCP keep-alive options are configurable.
-
Add
io-timeoutoption.
Core Development
-
Simplify storage driver info and list functions.
-
Split session functionality of
SocketClientout intoSocketSession. -
Split session functionality of
TlsClientout intoTlsSession. -
Use
poll()instead ofselect()for monitoring socket read/write ready. -
Use
SocketSession/TlsSessionfor test servers. -
Always throw error when OpenSSL returns
SSL_ERROR_SYSCALL. -
Use
__noreturn_on error functions when coverage testing.
v2.25 — LZ4 Compression Support
Released: 2020-03-26
Core Features
-
Add lz4 compression support. Note that setting
compress-type=lz4will make new backups and archive incompatible (unrestorable) with prior versions of pgBackRest. -
Add
--dry-runoption to theexpirecommand. Use dry-run to see which backups/archive would be removed by theexpirecommand without actually removing anything.
Core Improvements
-
Improve performance of remote manifest build.
-
Fix detection of keepalive options on Linux.
-
Add configure host detection to set standards flags correctly.
-
Remove
compress/compress-leveloptions from commands where unused. These commands (e.g.restore,archive-get) never used the compress options but allowed them to be passed on the command line. Now they will error when these options are passed on the command line. If these errors occur then remove the unused options. -
Limit backup file copy size to size reported at backup start. If a file grows during the backup it will be reconstructed by WAL replay during recovery so there is no need to copy the additional data.
Core Development
-
Add infrastructure for multiple compression type support.
-
Improve performance of
MEM_CONTEXT*()macros. -
Allow storage reads to be limited by bytes.
v2.24 — Auto-Select Backup Set for Time Target
Released: 2020-02-25
Core Bug Fixes
-
Prevent defunct processes in asynchronous archive commands.
-
Error when
archive-get/archive-push/restoreare not run on a PostgreSQL host. -
Read HTTP content to eof when size/encoding not specified.
-
Fix resume when the resumable backup was created by Perl. In this case the resumable backup should be ignored, but the C code was not able to load the partial manifest written by Perl since the format differs slightly. Add validations to catch this case and continue gracefully.
Core Features
- Auto-select backup set on restore when time target is specified. Auto-selection is performed only when
--setis not specified. If a backup set for the given target time cannot not be found, the latest (default) backup set will be used.
Core Improvements
-
Skip
pg_internal.inittemp file during backup. -
Add more validations to the manifest on
backup.
Documentation Improvements
- Prevent lock-bot from adding comments to locked issues.
v2.23 — Bug Fix
Released: 2020-01-27
Core Bug Fixes
- Fix missing files corrupting the manifest. If a file was removed by PostgreSQL during the backup (or was missing from the standby) then the next file might not be copied and updated in the manifest. If this happened then the backup would error when restored.
Core Improvements
-
Use
pkg-configinstead ofxml2-configfor libxml2 build options. -
Validate checksums are set in the manifest on
backup/restore.
v2.22 — Bug Fix
Released: 2020-01-21
Core Bug Fixes
- Fix error in timeline conversion. The timeline is required to verify WAL segments in the archive after a backup. The conversion was performed base
10instead of16, which led to errors when the timeline was ≥0xA.
v2.21 — C Migration Complete
Released: 2020-01-15
Core Bug Fixes
-
Fix options being ignored by asynchronous commands. The asynchronous
archive-get/archive-pushprocesses were not loading options configured in command configuration sections, e.g.[global:archive-get]. -
Fix handling of
\in filenames.\was not being properly escaped when calculating the manifest checksum which prevented the manifest from loading. Since instances of\in cluster filenames should be rare to nonexistent this does not seem likely to be a serious problem in the field.
Core Features
-
pgBackRest is now pure C.
-
Add
pg-useroption. Specifies the database user name when connecting to PostgreSQL. If not specified pgBackRest will connect with the local OS user orPGUSER, which was the previous behavior. -
Allow path-style URIs in S3 driver.
Core Improvements
- The
backupcommand is implemented entirely in C.
Core Development
-
Add basic time management functions.
-
Add
httpLastModifiedToTime()to parse HTTPlast-modifiedheader. -
Parse dates in
storageS3InfoList()andstorageS3Info().
v2.20 — Bug Fixes
Released: 2019-12-12
Core Bug Fixes
-
Fix archive-push/archive-get when
PGDATAis symlinked. These commands tried to usecwd()asPGDATAbut this would disagree with the path configured in pgBackRest ifPGDATAwas symlinked. Ifcwd()does not match the pgBackRest path thenchdir()to the path and make sure the nextcwd()matches the result from the first call. -
Fix reference list when
backup.infois reconstructed inexpirecommand. Since thebackupcommand is still using the Perl version of reconstruct this issue will not express unless 1) there is a backup missing frombackup.infoand 2) theexpirecommand is run directly instead of running afterbackupas usual. This unlikely combination of events means this is probably not a problem in the field. -
Fix segfault on unexpected EOF in gzip decompression.
Core Development
- Add manifest build for new backups.
v2.19 — C Migrations and Bug Fixes
Released: 2019-11-12
Core Bug Fixes
-
Fix remote timeout in delta restore. When performing a delta restore on a largely unchanged cluster the remote could timeout if no files were fetched from the repository within
protocol-timeout. Add keep-alives to prevent remote timeout. -
Fix handling of repeated HTTP headers. When HTTP headers are repeated they should be considered equivalent to a single comma-separated header rather than generating an error, which was the prior behavior.
Core Improvements
-
JSON output from the
infocommand is no longer pretty-printed. Monitoring systems can more easily ingest the JSON without linefeeds. External tools such asjqcan be used to pretty-print if desired. -
The
checkcommand is implemented entirely in C.
Documentation Improvements
-
Document how to contribute to pgBackRest.
-
Document maximum version for
auto-stopoption.
Test Improvements
-
Fix container test path being used when
--vm=none. -
Fix mismatched timezone in expect test.
-
Don't autogenerate embedded libc code by default.
v2.18 — PostgreSQL 12 Support
Released: 2019-10-01
Core Features
-
PostgreSQL 12 support.
-
Add
infocommandsetoption for detailed text output. The additional details include databases that can be used for selective restore and a list of tablespaces and symlinks with their default destinations. -
Add
standbyrestore type. This restore type automatically addsstandby_mode=onto recovery.conf for PostgreSQL < 12 and createsstandby.signalfor PostgreSQL ≥ 12, creating a common interface between PostgreSQL versions.
Core Improvements
- The
restorecommand is implemented entirely in C.
Core Development
-
Migrate backup manifest load/save to C.
-
Improve performance of info file load/save.
-
Add helper function for adding
CipherBlockfilters to groups.
Documentation Improvements
-
Document the relationship between
db-timeoutandprotocol-timeout. -
Add documentation clarifications regarding standby repositories.
-
Add FAQ for time-based Point-in-Time Recovery.
v2.17 — C Migrations and Bug Fixes
Released: 2019-09-03
Core Bug Fixes
-
Improve slow manifest build for very large quantities of tables/segments.
-
Fix exclusions for special files.
Core Improvements
-
The
stanza-create/update/deletecommands are implemented entirely in C. -
The
start/stopcommands are implemented entirely in C. -
Create log directories/files with
0750/0640mode.
Core Development
- Move info file checksum to the end of the file.
Documentation Bug Fixes
- Fix
yum.p.opackage being installed when custom package specified.
Documentation Improvements
- Build pgBackRest as an unprivileged user.
v2.16 — C Migrations and Bug Fixes
Released: 2019-08-05
Core Bug Fixes
-
Retry S3
RequestTimeTooSkewederrors instead of immediately terminating. -
Fix incorrect handling of
transfer-encodingresponse toHEADrequest. -
Fix scoping violations exposed by optimizations in gcc 9.
Core Features
- Add
repo-s3-portoption for setting a non-standard S3 service port.
Core Improvements
-
The
localcommand forbackupis implemented entirely in C. -
The
checkcommand is implemented partly in C.
Core Development
-
Add Perl interface to C storage layer.
-
Add
Dbobject to encapsulate PostgreSQL queries and commands. -
Add PostgreSQL query client.
v2.15 — C Implementation of Expire
Released: 2019-06-25
Core Bug Fixes
- Fix archive retention expiring too aggressively.
Core Improvements
-
The
expirecommand is implemented entirely in C. -
The
localcommand for restore is implemented entirely in C. -
Remove hard-coded PostgreSQL user so
$PGUSERworks. -
Honor configure
--prefixoption. -
Rename
repo-s3-verify-ssloption torepo-s3-verify-tls. The new name is preferred because pgBackRest does not support any SSL protocol versions (they are all considered to be insecure). The old name will continue to be accepted.
Core Development
-
Add most unimplemented functions to the remote storage driver.
-
Rename
info*New()functions toinfo*NewLoad(). -
Add backup management functions to
InfoBackup.
Documentation Improvements
-
Add FAQ to the documentation.
-
Use
wal_level=replicain the documentation for PostgreSQL ≥ 9.6.
v2.14 — Bug Fix and Improvements
Released: 2019-05-20
Core Bug Fixes
- Fix segfault when
process-max> 8 forarchive-push/archive-get.
Core Improvements
-
Bypass database checks when
stanza-deleteissued withforce. -
Add
configurescript for improved multi-platform support.
Core Development
-
Filter improvements. Only process next filter in
IoFilterGroupwhen input buffer is full or flushing. Improve filter's notion of "done" to optimize filter processing. -
Improve performance of non-blocking reads by using maximum buffer size.
-
Add
storageInfoList()to get detailed info about all entries in a path. -
Allow
storageInfo()to follow links. -
Allow
StorageFileWriteto set user, group, and modification time. -
Add
pathExists()toStorageobject. -
Improve zero-length content handling in
HttpClientobject. -
Don't append
strerror()to error message whenerrnois 0. -
Improve type safety of interfaces and drivers.
-
Add
--coption to request a C remote. -
Add
common/macro.hfor general-purpose macros. -
Add macros for object free functions.
-
Various
MemContextcallback improvements. -
Various
Bufferimprovements. -
Simplify storage object names.
-
Add
ioWriteStr()andioWriteStrLine(). -
Add separate functions to encode/decode each JSON type.
-
Add macros to create constant
Bufferobjects. -
Add missing
httpUriEncode()in S3 request. -
Add
unsigned intVarianttype and update code to use it. -
Expose handle (file descriptor) from
IoWritewhen applicable. -
Add
iniSave()andiniMove()toIniobject. -
Add
*Save()functions to mostInfoobjects. -
Extern
infoHash()so it can be used by other modules. -
varNewKv()accepts aKeyValueobject rather than creating one. -
Add constant for maximum buffer sizes required by
cvt*()functions. -
Add
trueandfalseStringconstants. -
Refactor
Iniinterface to exposeStringvalues instead ofVariant. -
Refactor
main()as aswitch()statement. -
Add
cfgOptionUInt()andcfgOptionUInt64()and update code to use them. -
Improve log performance, simplify macros, rename
logWill()tologAny(). -
Improve coverage in
perl/exec,config/config, andconfig/parsemodules. -
Remove
-Wswitch-enumcompiler option. -
Error on multiple option alternate names and simplify help command.
-
Use
THROW_ON_SYS_ERROR*()to improve code coverage. -
Improve macros and coverage rules that were hiding missing coverage.
-
Improve efficiency of
FUNCTION_LOG*()macros.
Documentation Features
- Add user guides for CentOS/RHEL 6/7.
Documentation Development
-
Automate coverage summary report generation.
-
Add
--out-preserveto preserve contents of output path. -
Restore index menu url default lost in b85e51d6.
Test Development
-
Add
harnessInfoChecksum/Z()to ease creation of test info files. -
Update containers with PostgreSQL minor releases and
liblz4. -
Add
testUser()andtestGroup(). -
Add
build-maxoption to set max build processes. -
Reduce ScalityS3 processes since only two are needed.
-
Update
mock/expiremodule test matrix so expect tests output.
v2.13 — Bug Fixes
Released: 2019-04-18
Core Bug Fixes
-
Fix zero-length reads causing problems for IO filters that did not expect them.
-
Fix reliability of error reporting from
local/remoteprocesses. -
Fix Posix/CIFS error messages reporting the wrong filename on write/sync/close.
Core Development
-
Harden IO filters against zero input and optimize zero output case.
-
Move
lockRelease()to the end ofexitSafe(). -
Add
CHECK()macro for production assertions. -
Automatically generate constants for command and option names.
-
Use a macro instead of a nested struct to create common
Stringvariables. -
Add
STR()macro to create constantStringobjects from runtime strings. -
Add macros to create constant
Varianttypes. -
Migrate
backupRegExp()to C.
Documentation Development
- Option to build documentation from current apt.postgres.org packages.
v2.12 — C Implementation of Archive Push
Released: 2019-04-11
Core Bug Fixes
-
Fix issues when a path option is / terminated.
-
Fix issues when
log-level-file=offis set for thearchive-getcommand. -
Fix C code to recognize
host:portoption format like Perl does. -
Fix issues with
remote/localcommand logging options.
Core Improvements
-
The
archive-pushcommand is implemented entirely in C. -
Increase
process-maxlimit to999. -
Improve error message when an S3 bucket name contains dots.
Core Development
-
Add separate
archive-push-asynccommand. -
CryptoHashimprovements and fixes. Fix incorrect buffer size used incryptoHashOne(). Add missingconsttocryptoHashOne()andcryptoHashOneStr(). Add hash size constants. Extern hash type constant. -
Add
CIFSstorage driver. -
Add file write to the remote and S3 storage drivers.
-
Add
storageRepoWrite()andstoragePg()/storagePgWrite()to storage helper. -
Use a single file to handle global errors in async archiving.
-
Add document creation to XML objects.
-
Remove redundant documentation from PostgreSQL interface files and clarify ambiguous function names.
-
Add WAL info to PostgreSQL interface.
-
Refactor PostgreSQL interface to remove most code duplication.
-
Logging improvements. Allow three-digit process IDs in logging. Allow process id in C logging.
-
Add process id to
ProtocolParallelJob. -
Add process id to C
archive-getandarchive-pushlogging. -
Close log file before
exec(). -
Allow warnings to be written by
archiveAsyncStatusOkWrite(). -
Move WAL path prefix logic into
walPath(). -
Make notion of current PostgreSQL info ID in C align with Perl.
-
Add locking capability to the remote command.
-
Add
forkSafe()to handle fork errors. -
Add
httpHeaderDup(). -
httpClientRequest()accepts a body parameter. -
Add
protocolKeepAlive()to sendnoopsto all remotes. -
Make
strLstDup()null-tolerant. -
Add
strLstMergeAnti()for merge anti-joins. -
Add
cvtSSizeToZ()and debug macros. -
Remove unused
infoArchiveCheckPg()function. -
Add constants for
.ok/.errorstatus extensions.
Documentation Improvements
- Clarify that S3-compatible object stores are supported.
Test Development
-
Build test harness with the same warnings as code being tested.
-
Add
TEST_64BIT()macro to detect 64-bit platforms. -
Skip coverage for macros with numbers in their name.
-
Use
restorecommand for remote performances tests.
v2.11 — C Implementation of Archive Get
Released: 2019-03-11
Core Bug Fixes
-
Fix possible truncated WAL segments when an error occurs mid-write.
-
Fix info command missing WAL min/max when stanza specified.
-
Fix non-compliant JSON for options passed from C to Perl.
Core Improvements
-
The
archive-getcommand is implemented entirely in C. -
Enable socket keep-alive on older Perl versions.
-
Error when parameters are passed to a command that does not accept parameters.
-
Add hints when unable to find a WAL segment in the archive.
-
Improve error when hostname cannot be found in a certificate.
-
Add additional options to
backup.manifestfor debugging purposes.
Core Development
-
Migrate
localandremotecommands to C. -
Add separate
archive-get-asynccommand. -
Add
ProtocolParallel*objects for parallelizing commands. -
Add
ProtocolCommandobject. -
Add
exists()to remote storage. -
Resolve storage path expressions before passing to remote.
-
Expose handle (file descriptor) from
IoReadwhen applicable. -
Add
storageHelperFree()to storage helper. -
Add
kvKeyExists()toKeyValueobject. -
Add
lstRemove()toListobject. -
Allow
cfgExecParam()to exclude options. -
MemContextimprovements. Improve performance of context and memory allocations. UsecontextTop/contextCurrentinstead ofmemContextTop()/memContextCurrent(). Don't make a copy of the context name. -
Make
DESTDIRfully-configurable in theMakefile. -
Add note for
CSTDsettings on BSD variants. -
Add
cleananduninstalltargets toMakefile. -
Change
execRead()to return asize_t. -
Prevent option warning from being output when running help command.
-
Improve null-handling of
strToLog()andvarToLog(). -
Increase per-call stack trace size to
4096. -
Move
compressmodule tocommon/compress. -
Move
cryptomodule tocommon/crypto.
Documentation Improvements
- Update default documentation version to PostgreSQL 10.
Documentation Development
-
Add instructions for building the coverage report.
-
Documentation builds on PostgreSQL 9.4-10.
Test Development
-
Create test matrix for
mock/archive,mock/archive-stop,mock/all,mock/expire, andmock/stanzato increase coverage and reduce tests. -
Improve fork harness to allow multiple children and setup pipes automatically.
-
Reduce expect log level in
mock/archiveandmock/stanzatests. -
Rename test modules for consistency.
-
Only run test-level stack trace by default for unit-tested modules.
-
Add missing ToLog() coverage to
String,List, andPgControl. -
Create aliases for test VMs ordered by age.
v2.10 — Bug Fixes
Released: 2019-02-09
Core Bug Fixes
-
Add unimplemented S3 driver method required for
archive-get. -
Fix check for improperly configured
pg-path.
Core Development
-
JSON improvements. Optimize parser implementation. Make the renderer more null tolerant.
-
Automatically adjust
db-timeoutwhenprotocol-timeoutis smaller.
v2.09 — Minor Improvements and Bug Fixes
Released: 2019-01-30
Core Bug Fixes
- Fix issue with multiple async status files causing a hard error.
Core Improvements
-
The
infocommand is implemented entirely in C. -
Simplify
infocommand text message when no stanzas are present. Replace the repository path with "the repository". -
Add
_DARWIN_C_SOURCEflag to Makefile for MacOS builds. -
Update address lookup in C TLS client to use modern methods.
-
Include Posix-compliant header for
strcasecmp()andfd_set.
Core Development
-
Add remote storage objects.
-
Add
ProtocolClientobject and helper functions. -
Add
Execobject. -
Add
IoHandleReadandIoHandleWriteobjects. -
Add
cfgExecParam()to generate parameters for executing commands. -
Ignore
SIGPIPEsignals and checkEPIPEresult instead. -
Function log macro improvements. Rename FUNCTION_DEBUG_ and consolidate ASSERT_ macros for consistency. Improve
CONSTandP/PPtype macro handling. MoveMACRO_TO_STR()tocommon/debug.h. Remove unused type parameter fromFUNCTION_TEST_RETURN(). -
Make the C version of the
infocommand conform to the Perl version. -
Improve accuracy of
strSizeFormat(). -
Add
ioReadBuf()to easily read into a buffer. -
JSON improvements. Allow empty arrays in JSON parser. Fix null output in JSON renderer. Fix escaping in JSON string parser/renderer.
-
Allocate extra space for concatenations in the
Stringobject. -
Return
UnknownErrorfromerrorTypeFromCode()for invalid error codes. -
Update Perl repo rules to work when stanza is not specified.
-
Update
Storage::Local->list()to accept an undefined path. -
Null-terminate list returned by
strLstPtr(). -
Add
kvMove()andvarLstMove(). -
Replace
FileOpenErrorwithHostConnectErrorinTlsClient. -
Allow string
Variantobjects to containnull. -
Rename
common/io/handlemodule tocommon/io/handleWrite. -
Add
const VariantList *debug type.
Documentation Bug Fixes
- Fix hard-coded repository path.
Documentation Improvements
-
Clarify that encryption is always performed client-side.
-
Add examples for building a documentation host.
-
Allow
ifin manifest variables, lists, and list items.
Test Development
-
Move C module include in
test.cabove headers included for testing. -
Allow primary
gidfor the test user to be different fromuid. -
Increase timeout in
storage/s3module to improve reliability.
v2.08 — Minor Improvements and Bug Fixes
Released: 2019-01-02
Core Bug Fixes
-
Remove request for S3 object info directly after putting it.
-
Correct
archive-get-queue-maxto besizetype. -
Add error message when current user
uid/giddoes not map to a name. -
Error when
--target-action=shutdownspecified for PostgreSQL < 9.5.
Core Improvements
-
Set TCP keepalives on S3 connections.
-
Reorder
infocommand text output so most recent backup is output last. -
Change file ownership only when required.
-
Redact
authenticationheader when throwing S3 errors.
Core Development
-
Enable S3 storage and encryption for
archive-getcommand in C. -
Migrate local
infocommand to C. -
Add S3 storage driver.
-
Add
HttpClientobject. -
Add
TlsClientobject. -
Add interface objects for libxml2.
-
Add encryption capability to
Info*objects. -
Add
IoFilterinterface toCipherBlockobject. -
Allow arbitrary
InOutfilters to be chained inIoFilterGroup. -
Add
infoBackupobject to encapsulate thebackup.infofile. -
Improve JSON to
Variantconversion and addVariantto JSON conversion. -
Storage helper improvements. Allow
NULLstanza in storage helper. Add path expression for repository backup. -
Info module improvements. Rename constants in
Infomodule for consistency. Remove#definestatements in theInfoPgmodule to conform with newly-adopted coding standards. Use cast to make for loop more readable inInfoPgmodule. AddinfoArchiveIdHistoryMatch()to theInfoArchiveobject. -
Allow I/O read interface to explicitly request blocking reads.
-
Improve error messages when info files are missing/corrupt.
-
Add
strSizeFormat()toStringobject. -
Add
strLstInsert()andstrLstInsertZ()toStringListobject. -
Rename
PGBACKREST/BACKRESTconstants toPROJECT. -
Require S3 key options except for
local/remotecommands. -
Explicitly compile with Posix 2001 standard.
-
Add
ServiceErrorfor errors from a service that can be retried. -
Conditional compilation of Perl logic in
exit.c. -
Merge
cipher.hintocrypto.h. -
Remove extraneous
use/includestatements. -
Remove embedded semicolon from
Stringconstant macros. -
Reduce debug level for
infoIni()to test. -
Return
IoFilterGroup *fromioFilterGroupAdd(). -
Add coding standards for
Stringconstants. -
Add missing
LOG_DEBUG()macro.
Documentation Improvements
-
Clarify when
target-actionis effective and PostgreSQL version support. -
Clarify that region/endpoint must be configured correctly for the bucket.
-
Add documentation for building the documentation.
Documentation Development
-
Add
admonitionsto all documentation renderers (HTML, PDF, Markdown and help text) and updatexmlfiles accordingly. -
Add HTML table rendering and update PDF/Markdown renderers to support header-less tables. Add optional table captions.
-
Escape special characters in latex when not in a code block.
-
Base menu ordering on natural ordering in the manifest.
-
Replace keywords with more flexible if statements.
-
Pre-build containers for any
executeelements markedpre. -
Documentation may be built with user-specified packages.
-
Add Centos/RHEL 7 option to documentation build.
-
Allow custom logo for PDF documentation.
-
Modify general document elements to allow any child element.
-
Use absolute paths so that
./doc.plruns. -
Pick
pg_switch_wal()/pg_switch_xlog()based on PostgreSQL version. -
Add configuration to the standby so it works as a primary when promoted.
-
Create common
ifexpressions for testingos-type. -
Add
zlib1g-devto Debian builds.
Test Development
-
New test containers with static test certificates.
-
Fix test binary name for
gprof. -
Allow arbitrary multiplier and flush character in
IoTestFilterMultiply. -
Update URL for Docker install.
-
Add
testRepoPath()to let C unit tests know where the code repository is located. -
Merge
common/typeStringListTestmodule intocommon/typeStringTest. -
Merge
common/typeVariantListTestmodule intocommon/typeVariantTest.
v2.07 — Automatic Backup Checksum Delta
Released: 2018-11-16
Core Bug Fixes
-
Fix issue with
archive-push-queue-maxnot being honored on connection error. -
Fix static WAL segment size used to determine if
archive-push-queue-maxhas been exceeded. -
Fix error after log file open failure when processing should continue.
Core Features
- Automatically enable backup checksum delta when anomalies (e.g. timeline switch) are detected.
Core Improvements
- Retry all S3
5xxerrors rather than just500internal errors.
Core Development
-
Correct current history item in
InfoPgto always be in position 0. -
Make
ioReadLine()read less aggressively. -
Add
ioWriteFlush()to flush pending output. -
Add destructors to
IoReadandIoWriteobjects. -
Add
basevariants to all integer to string conversion functions. -
Add
lstInsert()toListobject. -
Add
strCatChr(),strEmpty(), and constant macros toStringobject. -
Add
regExpPrefix()to aid in static prefix searches. -
Correct
cfgDefDataFind()to useUINTPinstead ofVOIDPP. -
Change
infoArchiveCheckPg()to display the PostgreSQL version as a string (e.g. 9.4) instead of the integer representation (e.g. 90400) when throwing an error. -
Allow storage path and file mode to be 0.
-
Limit usable
Buffersize without changing allocated size. -
Construct
Waitobject in milliseconds instead of fractional seconds. -
Add
THROW*_ON_SYS_ERROR*macros to test and throw system errors. -
Add
KernelErrorto report miscellaneous kernel errors. -
Use
THROW_ON_SYS_ERRORmacro to improveforkcode coverage. -
Storageinterface methods no longer declare the driver as const. -
Add
memContextCallbackClear()to prevent doublefree()calls. -
Merge
crypto/randommodule intocrypto/crypto. -
Add
cryptoError()and update crypto code to use it. -
Rename
CipherErrortoCryptoError. -
Reword misleading message in stack trace when parameter buffer is full.
-
Add logging macros for
TimeMSectype. -
Modify value of
PERL_EMBED_ERRORmacro.
Documentation Development
-
Add new HTML tags and
strExtratoDocHtmlElement. -
Remove error suppression for pgBackRest
make.
Test Development
-
New test containers. Add libxml2 library needed for S3 development. Include new minor version upgrades for PostgreSQL. Remove PostgreSQL 11 beta/rc repository.
-
Test speed improvements. Mount
tmpfsinVagrantfileinsteadtest.pl. Preserve contents of C unit test build directory betweentest.plexecutions. Improve efficiency of code generation. -
New, concise coverage report for C.
-
Add
TEST_LOG()andTEST_LOG_FMT()macros. -
Improve alignment of expected vs. actual error test results.
-
Add time since the beginning of the run to each test statement.
v2.06 — Checksum Delta Backup and PostgreSQL 11 Support
Released: 2018-10-15
Core Bug Fixes
-
Fix missing URI encoding in S3 driver.
-
Fix incorrect error message for duplicate options in configuration files.
-
Fix incorrectly reported error return in
infologging. A return code of 1 from thearchive-getwas being logged as an error message atinfolevel but otherwise worked correctly.
Core Features
-
Add checksum delta for incremental backups. Checksum delta backups uses checksums rather than timestamps to determine if files have changed.
-
PostgreSQL 11 support, including configurable WAL segment size.
Core Improvements
-
Ignore all files in a linked tablespace directory except the subdirectory for the current version of PostgreSQL. Previously an error would be generated if other files were present and not owned by the PostgreSQL user.
-
Improve
infocommand to display the stanza cipher type. -
Improve support for special characters in filenames.
-
Allow
deltaoption to be specified in the pgBackRest configuration file.
Core Development
-
Migrate local, unencrypted, non-S3
archive-getcommand to C. -
Storage refactoring. Posix file functions now differentiate between open and missing errors. Don't use negations in objects below Storage. Rename posix driver files/functions for consistency. Full abstraction of storage driver interface. Merge protocol storage helper into storage helper. Add CIFS driver to storage helper for read-only repositories.
-
Update all interfaces to use variable parameter constructors.
-
Info objects now parse JSON and use specified storage.
-
Add
ioReadLine()/ioWriteLine()toIoRead/IoWriteobjects. -
Add helper for repository storage.
-
Add
cryptoHmacOne()for HMAC support. -
Add
cfgDefOptionMulti()to identify multi-value options. -
Add
bufNewZ()andbufHex()toBufferobject. -
Allow
hashSize()to run on remote storage. -
Restore
bIgnoreMissingflag inbackupFile()lost in storage refactor. -
Migrate
walIsPartial(),walIsSegment(), andwalSegmentFind()from Perl to C. -
Migrate control functions to detect stop files to C.
-
Make archive-get info messages consistent between C and Perl implementations.
-
Change locking around async process forking to be more test friendly.
-
Simplify debug logging by allowing log functions to return
Stringobjects. -
Improve documentation in
filter.handfilter.internal.h.
Documentation Improvements
-
Use
commandinauthorized_hoststo improve SSH security. -
List allowable values for the
buffer-sizeoption in the configuration reference.
Documentation Development
- Update introduction to be pithy.
Test Development
-
Install nodejs from
deb.nodesource.com. -
Disable flapping
archive/getunit on CentOS 6. -
Move test expect log out of the regular test directory.
-
Fix buffer underrun in configuration test harness.
-
Fix missing test caused by a misplaced YAML tag.
-
Make Valgrind return an error even when a non-fatal issue is detected. Update some minor issues discovered in the tests as a result.
-
Add
-ftree-coalesce-varsoption to unit test compilation. -
Clear test directory between test runs.
-
Allow C or Perl coverage to run on more than one VM.
-
Don't perform valgrind when requested.
-
Remove compiler warnings that are not valid for u16.
-
Merge all posix storage tests into a single unit.
-
Add
.gitignoreto Csrcdirectory. -
Fix typo in unit test error messages, EXECTED => EXPECTED.
-
Make comment blocks consistent across all tests.
v2.05 — Environment Variable Options and Exclude Temporary/Unlogged Relations
Released: 2018-08-31
Core Bug Fixes
-
Fix issue where relative links in
$PGDATAcould be stored in the backup with the wrong path. This issue did not affect absolute links and relative tablespace links were caught by other checks. -
Remove incompletely implemented
onlineoption from thecheckcommand. Offline operation runs counter to the purpose of this command, which is to check if archiving and backups are working correctly. -
Fix issue where errors raised in C were not logged when called from Perl. pgBackRest properly terminated with the correct error code but lacked an error message to aid in debugging.
-
Fix issue when a boolean option (e.g.
delta) was specified more than once.
Core Features
-
Allow any option to be set in an environment variable. This includes options that previously could only be specified on the command line, e.g.
stanza, and secret options that could not be specified on the command-line, e.g.repo1-s3-key-secret. -
Exclude temporary and unlogged relation (table/index) files from backup. Implemented using the same logic as the patches adding this feature to PostgreSQL, 8694cc96 and 920a5e50. Temporary relation exclusion is enabled in PostgreSQL ≥
9.0. Unlogged relation exclusion is enabled in PostgreSQL ≥9.1, where the feature was introduced. -
Allow arbitrary directories and/or files to be excluded from a backup. Misuse of this feature can lead to inconsistent backups so read the
--excludedocumentation carefully before using. -
Add
log-subprocessoption to allow file logging forlocalandremotesubprocesses. -
PostgreSQL 11 Beta 3 support.
Core Improvements
-
Allow zero-size files in backup manifest to reference a prior manifest regardless of timestamp delta.
-
Improve asynchronous
archive-get/archive-pushperformance by directly checking status files. -
Improve error message when a command is missing the
stanzaoption.
Core Development
-
Validate configuration options in a single pass. By pre-calculating and storing the option dependencies in
parse.auto.cvalidation can be completed in a single pass, which is both simpler and faster. -
Add gzip compression/decompression filters for C.
-
Improve performance of string to int conversion. Use
strtoll()instead ofsprintf()for conversion. Also use available integer min/max constants rather than hard-coded values. -
Add
uint64variant type and supporting conversion functions. -
Add basic C JSON parser.
-
Migrate minimum set of code for reading
archive.infofiles from Perl to C. -
Allow
Bufferobject "used size" to be different than "allocated size". Add functions to manage used size and remaining size and update automatically when possible. -
Abstract IO layer out of the storage layer. This allows the routines to be used for IO objects that do not have a storage representation. Implement buffer read and write IO objects. Implement filters and update
cryptoHashto use the new interface. Implement size and buffer filters. -
storageFileRead()accepts a buffer for output rather than creating one. This is more efficient overall and allows the caller to specify how many bytes will be read on each call. Reads are appended if the buffer already contains data but the buffer size will never increase. -
Add
iniSectionList()toIniobject and remove dead code. -
Manifest improvements. Require PostgreSQL catalog version when instantiating a
Manifestobject (and not loading it from disk). Prevent manifest from being built more than once. Limit manifest build recursion (i.e. links followed) to sixteen levels to detect link loops. -
Do nothing in
memContextMove()when the context is already in the specified parent. -
Allow command/option constants to autonumber in both C and Perl to reduce churn when a new command/option is added.
-
Show exact log level required for stack trace param output instead of just "debug".
-
Update
Archive::Info->archiveIdList()to return a valid error code instead of unknown. -
Add
cvtBoolToConstZ()to simplify conversion of boolean to string. -
Add
cvtZToUInt()to convert string to unsigned int. -
Enable
-Wstrict-prototypes,-Wpointer-arith,-Wduplicated-branches,-Wvla, and-Wduplicated-condand update code to conform where necessary. -
Rename error-handling variables in
Main.pmto conform to standard. -
Remove redundant lines from embedded Perl by combining blank lines.
-
Define cipher magic size with
sizeof()rather than using a constant. -
Add
cvtCharToZ()and macro for debuggingcharparams. -
Add
strReplaceChr()toStringobject. -
Correct
OptionInvalidErrortoOptionInvalidValueErrorin boolean option parsing.
Documentation Bug Fixes
- Fix invalid log level in
log-pathoption reference.
Documentation Improvements
- Stop trying to arrange contributors in
release.xmlby last/first name. Contributor names have always been presented in the release notes exactly as given, but we tried to assign internal IDs based on last/first name which can be hard to determine and ultimately doesn't make sense. Inspired by Christophe's PostgresOpen 2017 talk, "Human Beings Do Not Have a Primary Key".
Documentation Development
-
Allow containers to be defined in a document. The defined containers are built before the document build begins which allows them to be reused.
-
Move most host setup to containers defined in the documentation. This includes PostgreSQL installation which had previously been included in the documentation. This way produces faster builds and there is no need for us to document PostgreSQL installation.
Test Improvements
- Error if LibC build is performed outside the test environment. LibC is no longer required for production builds.
Test Development
-
Use pre-built images from Docker Hub when the container definition has not changed. Downloading an image is quite a bit faster than building a new image from scratch and saves minutes per test run in CI.
-
Refactor the
common/logtests to not depend oncommon/harnessLog.common/harnessLogwas not ideally suited for general testing and made all the tests quite awkward. Instead, move all code used to test thecommon/logmodule into thelogTestmodule and repurposecommon/harnessLogto do log expect testing for all other tests in a cleaner way. Add a few exceptions for config testing since the log levels are reset by default inconfig/parse. -
Add
--log-level-testoption. This allows setting the test log level independently from the general test harness setting, but current only works for the C tests. It is useful for seeing log output from functions on the console while a test is running. -
Improve error reporting for
TEST_ASSIGN()andTEST_RESULT_VOID()macros. -
Update code count for new file types and exclusions.
v2.04 — Critical Bug Fix for Backup Resume
Released: 2018-07-05
Core Bug Fixes
-
Fix critical bug in resume that resulted in inconsistent backups. A regression in
v0.82removed the timestamp comparison when deciding which files from the aborted backup to keep on resume. See note above for more details. -
Fix error in selective restore when only one user database exists in the cluster.
-
Fix non-compliant ISO-8601 timestamp format in S3 authorization headers. AWS and some gateways were tolerant of space rather than zero-padded hours while others were not.
Core Features
- PostgreSQL 11 Beta 2 support.
Core Improvements
-
Improve the HTTP client to set
content-lengthto 0 when not specified by the server. S3 (and gateways) always setcontent-lengthortransfer-encodingbutHTTP 1.1does not require it and proxies (e.g. HAProxy) may not include either. -
Set
search_path = 'pg_catalog'on PostgreSQL connections.
Core Development
-
Move cryptographic hash functions to C using OpenSSL.
-
Split log levels into separate header file. Many modules that use
debug.hdo not need to do logging so this reduces dependencies for those modules. -
Auto-generate Makefile with dependencies.
-
Rename
ciphermodule to the more generalcrypto. -
Update Debian package to add debug symbols to pgBackRest executable.
-
Convert the not very portable
uinttype tounsigned int.
Documentation Improvements
-
Create a new section to describe building pgBackRest and build on a separate host.
-
Add sample S3 policy to restrict bucket privileges.
Documentation Development
-
Fix default location of
pgbackrest.confin option reference. -
Preliminary documentation for PostgreSQL 11 unprivileged user backup.
-
Remove call to
lscpuwhich can vary widely by build host. -
Build containers from scratch for more accurate testing. Use a prebuilt s3 server container.
-
Document generator improvements. Allow parameters to be passed when a container is created. Allow
/etc/hostsupdate to be skipped (for containers without bash). Allow environment load to be skipped. Allow bash wrapping to be skipped. Allow forcing a command to run as a user without sudo. Allow an entire execute list to be hidden.
Test Development
-
Add zero-length file to
mock/alltest. -
Update primary test environment (Vagrant and Docker) to Ubuntu 18.04.
-
Improve efficiency of C library builds now that they are used only for testing.
-
Remove RHEL and Debian package patches since they have been committed upstream.
-
Update parameters for
VBoxServicestart. -
Make
lsordering deterministic inmock/alltest.
v2.03 — Single Executable to Deploy
Released: 2018-05-22
Core Bug Fixes
-
Fix potential buffer overrun in error message handling.
-
Fix archive write lock being taken for the synchronous
archive-getcommand.
Core Improvements
-
Embed exported C functions and Perl modules directly into the pgBackRest executable.
-
Use
time_tinstead of__time_tfor better portability. -
Print total runtime in milliseconds at command end.
Core Development
-
Add stack trace macros to all functions. Low-level functions only include stack trace in test builds while higher-level functions ship with stack trace built-in. Stack traces include all parameters passed to the function but production builds only create the parameter list when the log level is set high enough, i.e.
debugortracedepending on the function. -
Build
libcusing links rather than referencing the C files insrcdirectly. The C library builds with different options which should not be reused for the C binary or vice versa.
Test Development
-
Test harness improvements. Allow more than one test to provide coverage for the same module. Add option to disable valgrind. Add option to disabled coverage. Add option to disable debug build. Add option to disable compiler optimization. Add
--dev-testmode. -
Update SSL error message test on CentOS 7.
-
Set
log-timestamp=nfor integration tests. This means less filtering of logs needs to be done and new timestamps can be added without adding new filters.
v2.02 — Parallel Asynchronous Archive Get and Configuration Includes
Released: 2018-05-06
Core Bug Fixes
-
Fix directory syncs running recursively when only the specified directory should be synced.
-
Fix
archive-copythrowing "path not found" error for incr/diff backups. -
Fix failure in manifest build when two or more files in
PGDATAare linked to the same directory. -
Fix delta restore failing when a linked file is missing.
-
Fix rendering of key/value and list options in help.
Core Features
-
Add asynchronous, parallel
archive-get. This feature maintains a queue of WAL segments to help reduce latency when PostgreSQL requests a WAL segment withrestore_command. -
Add support for additional pgBackRest configuration files. The directory is specified by the
--config-include-pathoption. Add--config-pathoption for overriding the default base path of the--configand--config-include-pathoption. -
Add
repo-s3-tokenoption to allow temporary credentials tokens to be configured. pgBackRest currently has no way to request new credentials so the entire command (e.g.backup,restore) must complete before the credentials expire.
Core Improvements
-
Update the
archive-push-queue-max,manifest-save-threshold, andbuffer-sizeoptions to accept values inKB,MB,GB,TB, orPBwhere the multiplier is a power of1024. -
Make backup/restore path sync more efficient. Scanning the entire directory can be very expensive if there are a lot of small tables. The backup manifest contains the path list so use it to perform syncs instead of scanning the backup/restore path.
-
Show command parameters as well as command options in initial info log message.
-
Rename archive-queue-max option to archive-push-queue-max. This is consistent with the new
archive-get-queue-maxoption. The old option name will continue to be accepted.
Core Development
-
Make
backup.historysync more efficient. Only thebackup.history/[year]directory was being synced, so check if thebackup.historyis newly created and sync it as well. -
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.
-
Improved lock implementation written in C. Now only two types of locks can be taken:
archiveandbackup. Most commands use one or the other but thestanza-*commands acquire both locks. This provides better protection than the old command-based locking scheme. -
Storage object improvements. Convert all functions to variadic functions. Enforce read-only storage. Add
storageLocalWrite()helper function. AddstorageCopy(),storageExists(),storageMove(),storageNewRead()/storageNewWrite(),storagePathCreate(),storagePathRemove(),storagePathSync(), andstorageRemove(). AddStorageFileReadandStorageFileWriteobjects. Abstract Posix driver code into a separate module. CallstoragePathRemove()from the Perl Posix driver. -
Improve
StringandStringListobjects. AddstrUpper(),strLower(),strLstExists(),strLstExistsZ(),strChr(),strSub(),strSubN(), andstrTrunc(). -
Improve
Bufferobject. AddbufNewC(),bufEq()andbufCat(). Only reallocate buffer when the size has changed. -
Add
pgControlInfo()to readpg_controland determine the PostgreSQL version. -
Add
walSegmentNext()andwalSegmentRange(). -
Error handling improvements. Add
THROWP_* macro variants for error handling. These macros allow anErrorTypepointer to be passed and are required for functions that may return different errors based on a parameter. Add_FMTvariants for allTHROWmacros so format types are checked by the compiler. -
Split
cfgLoad()into multiple functions to make testing easier. Mainly this helps with unit tests that need to do log expect testing. -
Allow
MemContextobjects to be copied to a new parent. This makes it easier to create objects and then copy them to another context when they are complete without having to worry about freeing them on error. UpdateList,StringList, andBufferto allow moves. UpdateIniandStorageto take advantage of moves. -
Full branch coverage in C code.
-
Refactor
usectomsecincommon/time.c. The implementation providesusecresolution but this is not needed in practice and it makes the interface more complicated due to the extra zeros. -
Replace
THROW_ON_SYS_ERROR()withTHROW_SYS_ERROR(). The former macro was hiding missing branch coverage for critical error handling. -
Start work on C handle io object and use it to output help.
-
Don't copy
CFGDEF_NAME_ALTorCFGDEF_INHERITwhen processing config option inheritance. -
Split debug and assert code into separate headers. Assert can be used earlier because it only depends on the error-handler and not logging. Add
ASSERT()macro which is preserved in production builds. -
Cleanup C types. Remove
typec.h. Order all typdefs above local includes. -
Fix header exclusion defines that do not match the general pattern.
Documentation Bug Fixes
- Update docs with 32-bit support and caveats. 32-bit support was added in v1.26.
Documentation Improvements
-
Add monitoring examples using PostgreSQL and jq.
-
Add example of command section usage to archiving configuration.
-
Remove documentation describing
info --output=jsonas experimental. -
Update out-of-date description for the
spool-pathoption.
Documentation Development
-
Add logic to find the real oid of the
test1database during restore testing. -
Document build improvements. Perform
apt-get updateto ensure packages are up to date before installing. Add-pto the repositorymkdirso it won't fail if the directory already exists, handy for testing packages.
Test Features
- Use lcov for C unit test coverage reporting. Switch from Devel::Cover because it would not report on branch coverage for reports converted from gcov. Incomplete branch coverage for a module now generates an error. Coverage of unit tests is not displayed in the report unless they are incomplete for either statement or branch coverage.
Test Development
-
Move test definitions to
test/define.yaml. The location is better because it is no longer buried in the Perl test libs. Also, the data can be easily accessed from C. -
Move help/version integration tests to
mock/all. Help and version are covered by unit tests, so we really just to need to make sure there is output when called from the command line. -
Move
archive-stopandexpiretests to themockmodule. These are mock integration tests so they should be grouped with the other mock integration tests. -
Add
harnessCfgLoad()test function, which allows a new config to be loaded for unit testing without resetting log functions, opening a log file, or taking locks. -
Add
HARNESS_FORKmacros for tests that require fork(). A standard pattern for tests makes fork() easier to use and should help prevent some common mistakes. -
Add
TEST_ERROR_FMTmacro to simplify testing of formatted error messages. -
Generate code counts for all source files. The source files are also classified by type and purpose.
-
Include VM type in
gcovpath to avoid conflicts between VMs with different architectures. -
Improve logic for smart builds to include version changes. Skip version checks when testing in
--devmode. -
Use pip 9.03 in test VMs. pip 10 drops support for Python 2.6 which is still used by the older test VMs.
-
Allow
-DDEBUG_UNITto be suppressed to test how debug macros behave. -
Rename Perl tests so they don't conflict with their C counterparts.
-
Divide tests into three types (
unit,integration,performance). Many options that were set per test can instead be inferred from the types, i.e.container,c,expect, andindividual. -
Try tweaking time sync settings to prevent clock drift rather than restarting
VBoxServiceon every test run.
v2.01 — Minor Bug Fixes and Improvements
Released: 2018-03-19
Core Bug Fixes
-
Fix
--target-actionand--recovery-optionoptions being reported as invalid when restoring with--type=immediate. -
Immediately error when a secure option (e.g.
repo1-s3-key) is passed on the command line. Since pgBackRest would not pass secure options on to sub-processes an obscure error was thrown. The new error is much clearer and provides hints about how to fix the problem. Update command documentation to omit secure options that cannot be specified on the command-line. -
Fix issue passing
--no-configto embedded Perl. -
Fix issue where specifying
log-level-stderr>warnwould cause alocal/remoteprocess to error on exit due to output found on stderr when none was expected. The max value for alocal/remoteprocess is nowerrorsince there is no reason for these processes to emit warnings. -
Fix manifest test in the
checkcommand when tablespaces are present.
Core Improvements
-
Error when multiple arguments are set in the config file for an option that does not accept multiple arguments.
-
Remove extraneous sudo commands from
src/Makefile.
Core Development
-
Improve Perl configuration. Set config before
Main::main()call to avoid secrets being exposed in a stack trace. Move logic for setting defaults to C. -
Improve logging. Move command begin to C except when it must be called after another command in Perl (e.g.
expireafterbackup). Command begin logs correctly for complex data types like hash and list. Specify which commands will log to file immediately and set the default log level for log messages that are common to all commands. File logging is initiated from C. -
Port most of
Config::Config::configLoad()from Perl to C. -
Fix incorrect enum types in
config.cthat throw warnings under clang. -
Enable
-Wswitch-enum,-Wconversion,-Wformat=2,-Wformat-nonliteral, and-Wformat-signednessand silence new warnings. -
Improve code documentation in
configmodule. -
Improve debugging. Add
ASSERT_DEBUG()macro for debugging and replace all currentassert()calls except in tests that can't use the debug code. Replace remaining NDEBUG blocks with the more granular DEBUG_UNIT. Remove some debugmemset()calls inMemContextsince valgrind is more useful for these checks. -
Add
cfgOptionTest()and updatecfgOption()calls that are better implemented ascfgOptionTest(). -
Build with
-DNDEBUGby default but disable for testing. -
Check
intsize incommon/type.h. This ensures that integers are at least 32-bits without having to run the test suite. -
Improve conversion of C exceptions to
Exceptionobjects. Colons in the message would prevent all of the message from being loaded into theExceptionobject.
Documentation Improvements
-
Show index in examples for indexed options, i.e.
repo-*,pg-*. -
Simplify table of contents on command page by only listing commands.
-
Remove references to the C library being optional.
Test Features
-
Add CentOS/RHEL package builds.
-
Use clang for static code analysis. Nothing found initially except for some functions that should have been marked
__noreturn__.
Test Development
-
Build performance improvements. Improve bin and libc build performance. Improve code generation performance.
-
Config test code writes secure options to a file instead of passing on the command-line.
-
Disable console display of coverage for C files since
Devel::Coverdoes not handle it well. -
Add new test for
Common::Io::Processto show that output on stderr will raise an exception onclose()even if the exit code is 0. -
Update
pipbefore installingawscli. -
Remove
--smartfrom--expecttests. This ensures that new binaries are built before running the tests. -
Remove Debian package patch now that it has been merged upstream.
v2.00 — Performance Improvements for Archive Push
Released: 2018-02-23
Core Features
- The
archive-pushcommand is now partially coded in C which allows the PostgreSQLarchive_commandto run significantly faster when processing status messages from the asynchronous archive process.
Core Improvements
-
Improve
checkcommand to verify that the backup manifest can be built. -
Improve performance of HTTPS client. Buffering now takes the
pendingbytes on the socket into account (when present) rather than relying entirely onselect(). In some instances the final bytes would not be flushed until the connection was closed. -
Improve S3 delete performance. The constant
S3_BATCH_MAXhad 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.confto 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
pgbackrestexecutable is now a C binary instead of Perl. This allows certain time-critical commands (like asyncarchive-push) to run more quickly. -
Rename
db-*options topg-*andbackup-*options torepo-*to improve consistency.repo-*options are now indexed although currently only one is allowed.
Core Development
-
Implement
helpcommand in C. -
Implement
versioncommand in C. -
Config parsing implemented in C and passed to Perl as JSON.
-
Add
Buffer,Ini,KeyValue,List,RegExp,Storage,String,StringList,Variant,VariantList, andWaitobjects. -
Add
command,exit,log, andtimemodules. -
Remove deprecated
archive-max-mboption. -
Improve
MemContextmodule. Add temporary context blocks and refactor allocation arrays to include allocation size. -
Improve
errormodule. Add functions to convert error codes to C errors and handle system errors. -
Create a master list of errors in
build/error.yaml. The C and Perl errors lists are created automatically byBuild.pmso they stay up to date. -
Move lock release later in exitSafe() to reduce the chance of a new process starting and acquiring a lock before the old process has exited.
-
Add 30 second wait loop to lockAcquire() when fail on no lock enabled. This should help prevent processes that are shutting down from interfering with processes that are starting up.
-
Replace
cfgCommandTotal()/cfgOptionTotal()functions with constants. The constants are applicable in more cases and allow the compiler to optimize certain loops more efficiently. -
Cleanup usage of internal options. Apply internal to options that need to be read to determine locality but should not appear in the help.
-
Refactor code to make valgrind happy.
-
Fix non-compliant formatting for function declarations.
Documentation Features
- All clusters in the documentation are initialized with checksums.
Documentation Improvements
-
List deprecated option names in documentation and command-line help.
-
Clarify that S3 buckets must be created by the user.
Documentation Development
-
Add coding standards document.
-
Improve section source feature to not require a title or content. The title will be pulled from the source document.
-
Allow code blocks to have a type. Currently this is only rendered in Markdown.
-
Add table render for Markdown format.
-
PDF rendering improvements. Check both
doc-pathandbin-pathfor logo. Allow PDF to be output to a location other than theoutputdirectory. Use PDF-specific version variable for more flexible formatting. Allow sections to be excluded from table of contents. More flexible replacements for titles and footers. Fill is now the default for table columns. Column width is specified as a percentage rather that using latex-specific notation. Fix missing variable replace forcode-blocktitle. -
Add
idparam for hosts created withhost-add. Thehost-*-ipvariable is created from theidparam so thenameparam can be changed without affecting thehost-*-ipvariable. Ifidis not specified then it is copied fromname. -
Deploy historical documentation to
priorrather than the root directory.
Test Development
-
Run valgrind on all C unit tests.
-
Only build C binary/library for Perl unit/integration tests or C unit tests that require Perl.
-
Improve speed of C unit tests. Preserve object files between tests and use a Makefile to avoid rebuilding object files.
-
Report coverage errors via the console. This helps with debugging coverage issues on remote services like Travis.
-
No longer run
masterbranch through CI. Theintegrationbranch will be run through CI and then pushed tomasterwith github status checks. -
Rename Perl tests so they don't conflict with their C counterparts.
-
Update URL for Debian package repository.
v1.29 — Critical Bug Fix for Backup Resume
Released: 2018-07-05
Core Bug Fixes
-
Fix critical bug in resume that resulted in inconsistent backups. A regression in
v0.82removed the timestamp comparison when deciding which files from the aborted backup to keep on resume. See note above for more details. -
Fix non-compliant ISO-8601 timestamp format in S3 authorization headers. AWS and some gateways were tolerant of space rather than zero-padded hours while others were not.
-
Fix directory syncs running recursively when only the specified directory should be synced.
-
Fix
--target-actionand--recovery-optionoptions being reported as invalid when restoring with--type=immediate. -
Fix
archive-copythrowing "path not found" error for incr/diff backups. -
Fix failure in manifest build when two or more files in
PGDATAare linked to the same directory. -
Fix delta restore failing when a linked file was missing.
-
Fix error in selective restore when only one user database exists in the cluster.
Core Improvements
-
Improve the HTTP client to set
content-lengthto 0 when not specified by the server. S3 (and gateways) always setcontent-lengthortransfer-encodingbutHTTP 1.1does not require it and proxies (e.g. HAProxy) may not include either. -
Improve performance of HTTPS client. Buffering now takes the
pendingbytes on the socket into account (when present) rather than relying entirely onselect(). In some instances the final bytes would not be flushed until the connection was closed. -
Improve S3 delete performance. The constant
S3_BATCH_MAXhad been replaced with a hard-coded value of 2, probably during testing. -
Make backup/restore path sync more efficient. Scanning the entire directory can be very expensive if there are a lot of small tables. The backup manifest contains the path list so use it to perform syncs instead of scanning the backup/restore path. Remove recursive path sync functionality since it is no longer used.
Core Development
-
Make
backup.historysync more efficient. Only thebackup.history/[year]directory was being synced, so check if thebackup.historyis newly created and sync it as well. -
Add log-level-stderr option for stanza-* commands.
Documentation Bug Fixes
- Update docs with 32-bit support and caveats. 32-bit support was added in v1.26.
Documentation Improvements
-
Clarify that S3 buckets must be created by the user.
-
Update out-of-date description for the
spool-pathoption.
Documentation Development
- Remove call to
lscpuwhich can vary widely by build host.
Test Development
-
Add new test for
Common::Io::Processto show that output on stderr will raise an exception onclose()even if the exit code is 0. -
Add zero-length file to
mock/alltest. -
Disable package build tests since
v1will no longer be packaged. Users installing packages should update tov2.v1builds are intended for users installing from source. -
Update SSL error message test on CentOS 7.
-
Update URL for Debian package repository.
-
Make
lsordering deterministic inmock/alltest. -
Change backup test user from
backresttopgbackrest.
v1.28 — Stanza Delete
Released: 2018-02-01
Core Bug Fixes
-
Fixed inability to restore a single database contained in a tablespace using --db-include.
-
Ensure latest
db-idis selected on when matchingarchive.infotobackup.info. This provides correct matching in the event there aresystem-idanddb-versionduplicates (e.g. after reverting apg_upgrade). -
Fixed overly chatty error message when reporting an invalid command.
Core Features
- Add
stanza-deletecommand to cleanup unused stanzas.
Core Improvements
- Improve
stanza-createcommand so that it does not error when the stanza already exists.
Core Development
-
Minor changes to
Manifestmodule, mostly for test reproducibility. -
Fix non-compliant formatting for function declarations.
Documentation Improvements
- Update
stanza-create --forcedocumentation to urge caution when using.
Test Development
- Add unit tests for the
Manifestmodule.
v1.27 — Bug Fixes and Documentation
Released: 2017-12-19
Core Bug Fixes
-
Fixed an issue that suppressed locality errors for
backupandrestore. When a backup host is present, backups should only be allowed on the backup host and restores should only be allowed on the database host unless an alternate configuration is created that ignores the remote host. -
Fixed an issue where WAL was not expired on PostgreSQL 10. This was caused by a faulty regex that expected all PostgreSQL major versions to be X.X.
-
Fixed an issue where the
--no-configoption was not passed to child processes. This meant the child processes would still read the local config file and possibly cause unexpected behaviors. -
Fixed
infocommand to eliminate"db (prior)"output if no backups or archives exist for a prior version of the cluster.
Core Development
- Add
memGrowRaw()to memory context module.
Documentation Features
-
Document the relationship between the
archive-copyandarchive-checkoptions. -
Improve
archive-copyreference documentation.
Documentation Development
-
Relax permissions set by
release.pl. -
Split "refactor" sections into "improvements" and "development" in the release notes. Many development notes are not relevant to users and simply clutter the release notes, so they are no longer shown on the website.
-
Allow internal options that do not show up in the documentation. Used for test options initially but other use cases are on the horizon.
Test Development
-
Update CI branches to
release/1andrelease/1-integration. -
No longer run
release/1branch through CI. Therelease/1-integrationbranch will be run through CI and then pushed torelease/1with github status checks. -
Move restore test infrastructure to
HostBackup.pm. Required to test restores on the backup server, a fairly common scenario. Improve the restore function to accept optional parameters rather than a long list of parameters. In passing, clean up extraneous use ofstrTypeandstrCommentvariables. -
Sync time to prevent build failures when running on VirtualBox.
v1.26 — Repository Encryption
Released: 2017-11-21
Core Bug Fixes
-
Fixed an issue that could cause copying large manifests to fail during restore.
-
Fixed incorrect WAL offset for 32-bit architectures.
-
Fixed an issue retrieving WAL for old database versions. After a
stanza-upgradeit should still be possible to restore backups from the previous version and perform recovery witharchive-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 an issue with invalid backup groups being set correctly on restore. If the backup cannot map a group to a name it stores the group in the manifest as
falsethen uses either the owner of $PGDATA to set the group during restore or failing that the group of the current user. This logic was not working correctly because the selected group was overwriting the user on restore leaving the group undefined and the user incorrectly set to the group. -
Fixed an issue passing parameters to remotes. When more than one db was specified the path, port, and socket path would for db1 were passed no matter which db was actually being addressed.
Core Features
- Repository encryption support.
Core Improvements
-
Disable gzip filter when
--compress-level-network=0. The filter was used with compress level set to 0 which added overhead without any benefit. -
Inflate performance improvement for gzip filter.
Core Development
-
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.
-
Add
listtype for options. Thehashtype was being used for lists with an additional flag (value-hash) to indicate that it was not really a hash. -
Remove configurable option hints.
db-pathwas the only option with a hint so the feature seemed wasteful. All missing stanza options now output the same hint without needing configuration. -
Convert configuration definitions from auto-generated functions to auto-generated data structures.
-
Add
eofto S3 file driver (required for encryption support). -
Enable additional warnings for C builds.
-
Simplify try..catch..finally names. Also wrap in a do...while loop to make sure that no random else is attached to the main if block.
-
Improve base64 implementation. Different encoded strings could be generated based on compiler optimizations. Even though decoding was still successful the encoded strings did not match the standard.
-
Disable
-Wclobbercompiler warning because it is mostly useless but keep the rest of-Wextra.
Documentation Features
- Add template to improve initial information gathered for issue submissions.
Documentation Improvements
- Clarify usage of the
archive-timeoutoption and describe how it is distinct from the PostgreSQLarchive_timeoutsetting.
Documentation Development
- Update
release.plto push data to site repository.
Test Features
- Automated tests for 32-bit i386/i686 architecture.
Test Development
-
Update Debian/Ubuntu containers to download latest version of
pip. -
Full unit test coverage for gzip filter.
-
Only check expect logs on CentOS 7. Variations in distros cause false negatives in tests but don't add much value.
-
Fix flapping protocol timeout test. It only matters that the correct error code is returned, so disable logging to prevent message ordering from failing the expect test.
-
Designate a single distro (Ubuntu 16.04) for coverage testing. Running coverage testing on multiple distros takes time but doesn't add significant value. Also ensure that the distro designated to run coverage tests is one of the default test distros. For C tests, enable optimizations on the distros that don't do coverage testing.
-
Automate generation of WAL and
pg_controltest 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. -
Refactor C unit test macros so they compile with
-Wstrict-aliasing. -
Refactor C page checksum unit test to compile with
-Wstrict-aliasing.
v1.25 — S3 Performance Improvements
Released: 2017-10-24
Core Bug Fixes
-
Fix custom settings for
compress-leveloption being ignored. -
Remove error when overlapping timelines are detected. Overlapping timelines are valid in many Point-in-Time-Recovery (PITR) scenarios.
-
Fix instances where
database-idwas not rendered as an integer in JSON info output.
Core Features
- Improve performance of list requests on S3. Any beginning literal portion of a filter expression is used to generate a search prefix which often helps keep the request small enough to avoid rate limiting.
Core Development
-
Improve protocol error handling. In particular, "stop" errors are no longer reported as "unexpected".
-
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.
-
Replace dynamically built class hierarchies in I/O layer with fixed
parent()calls. -
Improve labeling for errors in helper processes.
-
Update C naming conventions.
-
Use
intdatatype wherever possible. -
Better separation of C source from Perl interface.
-
Add
LibC.template.pmto simplify LibC module generation. -
Add C error handler.
-
Perl error handler recognizes errors thrown from the C library.
-
Page checksum module uses new C error handler.
-
Add C memory contexts.
-
Add base64 encode/decode.
Test Features
- Add I/O performance tests.
Test Development
-
Add C unit test infrastructure.
-
Add test macros for C results and errors.
-
Warnings in C builds treated as errors.
-
Run all tests on tempfs rather than local disk.
-
Improve performance of test code. Wait when all tests have been assigned to reduce CPU load.
-
Remove Debian test repo after PostgreSQL 10 release.
-
Convert config and page checksum tests into C unit tests.
-
Add PostgreSQL versions to Debian VMs for testing.
v1.24 — New Backup Exclusions
Released: 2017-09-28
Core Bug Fixes
-
Fixed an issue where warnings were being emitted in place of lower priority log messages during backup from standby initialization.
-
Fixed an issue where some
db-*options (e.g.db-port) were not being passed to remotes.
Core Features
-
Exclude contents of
pg_snapshots,pg_serial,pg_notify, andpg_dynshmemfrom backup since they are rebuilt on startup. -
Exclude
pg_internal.initfiles from backup since they are rebuilt on startup.
Core Improvements
- Open log file after async process is completely separated from the main process to prevent the main process from also logging to the file.
Core Development
-
Dynamically generate list of files for C library build.
-
Break up
LibC.xsinto separate module files.
Documentation Features
- Add passwordless SSH configuration.
Documentation Improvements
- Rename master to primary in documentation to align with PostgreSQL convention.
Documentation Development
- Add full installation where required and remove doc containers that included parts of the installation.
Test Development
- Improve C library smart build by ignoring changes outside of
/lib/pgBackRest/Config.
v1.23 — Multiple Standbys and PostgreSQL 10 Support
Released: 2017-09-03
Core Bug Fixes
-
Fixed an issue that could cause compression to abort on growing files.
-
Fixed an issue with keep-alives not being sent to the remote from the local process.
Core Features
-
Up to seven standbys can be configured for backup from standby.
-
PostgreSQL 10 support.
-
Allow
content-length(in addition to chunked encoding) when reading XML data to improve compatibility with third-party S3 gateways.
Core Improvements
-
Increase HTTP timeout for S3.
-
Add HTTP retries to harden against transient S3 network errors.
Core Development
- Configuration definitions are now pulled from the C library when present.
Documentation Bug Fixes
- Fixed document generation to include section summaries on the Configuration page.
Documentation Development
- Move contributor list to the end of
release.xmlfor convenience.
Test Development
-
Change log test order to ignore unimportant log errors while shutting down PostgreSQL.
-
Drain
stderrduring test process execution as well as termination to prevent lockups if there is a lot of output. -
Update Docker build in
Vagrantfile. -
Update containers to support C library builds in the documentation.
-
Simplify smart logic for C Library and package builds.
v1.22 — Fixed S3 Retry
Released: 2017-08-09
Core Bug Fixes
- Fixed authentication issue in S3 retry.
v1.21 — Improved Info Output and SSH Port Option
Released: 2017-08-08
Core Bug Fixes
-
The
archive_statusdirectory is now recreated on restore to support PostgreSQL 8.3 which does not recreate it automatically like more recent versions do. -
Fixed an issue that could cause the empty archive directory for an old PostgreSQL version to be left behind after a
stanza-upgrade.
Core Features
-
Modified the
infocommand (both text and JSON output) to display the archive ID and minimum/maximum WAL currently present in the archive for the current and prior, if any, database cluster version. -
Added
--backup-ssh-portand--db-ssh-portoptions to support non-default SSH ports.
Core Improvements
- Retry when S3 returns an internal error (500).
Core Development
- Add
bIgnoreMissingparameter toLocal->manifest().
Documentation Bug Fixes
- Fix description of
--onlinebased on the command context.
Documentation Features
- Add creation of
/etc/pgbackrest.confto manual installation instructions.
Documentation Improvements
- Move repository options into a separate section in command/command-line help.
Documentation Development
-
Reduce log verbosity when building documentation by only logging sections that contain an execute list directly or in a child section.
-
Debian/Ubuntu documentation now builds on Ubuntu 16.
-
Remove vestigial repository options from
backupcommand.
Test Development
-
Fix log checking after PostgreSQL shuts down to include
FATALmessages and disallow immediate shutdowns which can throwFATALerrors in the log. -
Use Google DNS in test environment for consistency.
-
Use new Travis Trusty image.
-
Generate global fake cert in containers for testing.
-
Consolidate
stanza-createandstanza-upgradetests into newstanzatest.
v1.20 — Critical 8.3/8.4 Bug Fix
Released: 2017-06-27
Core Bug Fixes
-
Fixed an issue that prevented tablespaces from being backed up on PostgreSQL ≤ 8.4.
-
Fixed missing flag in C library build that resulted in a mismatched binary on 32-bit systems.
Core Features
- Add
s3-repo-ca-pathands3-repo-ca-fileoptions to accommodate systems where CAs are not automatically found byIO::Socket::SSL, i.e. RHEL7, or to load custom CAs.
Core Development
-
Harden protocol handshake to handle race conditions.
-
Fixed misleading error message when a file was opened for write in a missing directory.
-
Change log level of hardlink logging to
detail. -
Cast size in S3 manifest to integer.
-
Rename
Archivemodules to remove redundancy. -
Improve S3 error reporting.
-
Minor optimizations to package loads and ordering for
archive-getandarchive-pushcommands.
Documentation Development
-
Remove exhaustive version list from Stable Releases TOC.
-
Improve S3 server implementation in documentation.
-
Update CentOS 6 documentation to build on PostgreSQL 9.5.
-
Remove
mountfrom hostcache-keybecause it can vary by system.
Test Features
- Add documentation builds to CI.
Test Development
-
Fix timeouts in
ExecuteTestto speed multi-process testing. -
Remove patch directory before Debian package builds.
-
Combine hardlink and non/compressed in synthetic tests to reduce test time and improve coverage.
-
Split
fullmodule intomockandrealto allow better test combinations and save time in CI. -
Consolidate
archive-pushandarchive-gettests into newarchivetest. -
Eliminate redundancy in
realtests. -
Install
sudoin base containers rather than on demand. -
More optimized container suite that greatly improves build time.
-
Added static Debian packages for
Devel::Coverto reduce build time. -
Add
deprecatedstate for containers. Deprecated containers may only be used to build packages. -
Remove Debian 8 from CI because it does not provide additional coverage over Ubuntu 12.04, 14.04, 16.04.
-
Add Debian 9 to test suite.
-
Remove
process-maxoption. Parallelism is now tested in a more targeted manner and the high level option is no longer needed. -
Balance database versions between VMs to minimize test duration.
-
Automatically check that all supported PostgreSQL versions are being tested on a single default VM.
-
Add
performancemodule and basic performance test forarchive-push.
v1.19 — S3 Support
Released: 2017-06-12
Core Bug Fixes
-
Fixed the
infocommand so the WAL archive min/max displayed is for the current database version. -
Fixed the
backupcommand so thebackup-standbyoption is reset (and the backup proceeds on the primary) if the standby is not configured and/or reachable. -
Fixed config warnings raised from a remote process causing errors in the master process.
Core Features
- Amazon S3 repository support.
Core Development
-
Refactor storage layer to allow for new repository filesystems using drivers.
-
Refactor IO layer to allow for new compression formats, checksum types, and other capabilities using filters.
-
Move modules in
Protocoldirectory in subdirectories. -
Move backup modules into
Backupdirectory.
Documentation Bug Fixes
-
Changed invalid
max-archive-mboption in configuration reference toarchive-queue-max. -
Fixed missing
sudoin installation section.
Test Development
-
Fixed an undefined variable when a module had no uncoverable code exceptions.
-
Fixed issue with
--dry-runrequiring--vm-outto work properly. -
Moved test and env modules to new directories to avoid namespace conflicts with common tests.
-
Set
--vm-max=2for CI. -
Remove flapping protocol timeout test that will be replaced in the upcoming storage patch.
v1.18 — Stanza Upgrade, Refactoring, and Locking Improvements
Released: 2017-04-12
Core Bug Fixes
- Fixed an issue where read-only operations that used local worker processes (i.e.
restore) were creating write locks that could interfere with parallelarchive-push.
Core Features
-
Added the stanza-upgrade command to provide a mechanism for upgrading a stanza after upgrading to a new major version of PostgreSQL.
-
Added validation of
pgbackrest.confto display warnings if options are not valid or are not in the correct section.
Core Improvements
-
Simplify locking scheme. Now, only the master process will hold write locks (for
archive-pushandbackupcommands) and not all local and remote worker processes as before. -
Do not set timestamps of files in the backup directories to match timestamps in the cluster directory. This was originally done to enable backup resume, but that process is now implemented with checksums.
-
Improved error message when the
restorecommand detects the presence ofpostmaster.pid. -
Renumber return codes between 25 and 125 to avoid PostgreSQL interpreting some as fatal signal exceptions.
Core Development
-
Refactor
Ini.pmto facilitate testing. -
The
backupandrestorecommands no longer copy via temp files. In both cases the files are checksummed on resume so there's no danger of partial copies. -
Allow functions to accept optional parameters as a hash.
-
Refactor
File->list()andfileList()to accept optional parameters. -
Refactor
backupLabel()and add unit tests. -
Silence some perl critic warnings.
Documentation Development
-
Update wording for release note sections.
-
Ignore clock skew in container libc/package builds using make. It is common for containers to have clock skew so the build process takes care of this issue independently.
Test Development
-
Complete statement/branch coverage for
Ini.pm. -
Improved functions used to test/munge manifest and info files.
-
Coverage testing always enabled on Debian-based containers.
-
Require description in every call to
testResult(). -
Make
iWaitSecondsan optional parameter fortestResult(). -
Updated vagrant to new version and image.
-
Fixed flapping archive stop tests.
-
Added ability to test warning messages.
v1.17 — Page Checksum Bug Fix
Released: 2017-03-13
Core Bug Fixes
- Fixed an issue where newly initialized (but unused) pages would cause page checksum warnings.
v1.16 — Page Checksum Improvements, CI, and Package Testing
Released: 2017-03-02
Core Bug Fixes
-
Fixed an issue where tables over 1GB would report page checksum warnings after the first segment.
-
Fixed an issue where databases created with a non-default tablespace would raise bogus warnings about
pg_filenode.mapandpg_internal.initnot being page aligned.
Core Development
- Improved the code and tests for
fileManifest()to prevent a possible race condition when files are removed by the database while the manifest is being built.
Documentation Development
- Container executions now load the user's environment.
Test Features
-
Continuous integration using
travis-ci. -
Automated builds of Debian packages for all supported distributions.
Test Development
-
Added
--devoption to aggregate commonly used dev options. -
Added
--retryoption. -
Added
--no-packageoption to skip package builds. -
C library and packages are built by default, added
-smartoption to rebuild only when file changes are detected. -
The
--libc-onlyoption has been changed to--build-onlynow that packages builds have been added. -
Improved formatting of
testResult()output. -
Improved truncation when outputting errors logs in the
ExecuteTestmodule. -
Fixed flapping archive-stop test with
testResult()retries. -
Added final test of archive contents to archive-push test.
-
Temporarily disable flapping keep-alive test.
v1.15 — Refactoring and Bug Fixes
Released: 2017-02-13
Core Bug Fixes
- Fixed a regression introduced in v1.13 that could cause backups to fail if files were removed (e.g. tables dropped) while the manifest was being built.
Core Development
- Refactor
FileCommon::fileManifest()andFileCommon::fileStatto be more modular to allow complete branch/statement level coverage testing.
Test Development
- Complete branch/statement level coverage testing for
FileCommon::fileManifest()andFileCommon::fileStatfunctions and helper functions.
v1.14 — Refactoring and Bug Fixes
Released: 2017-02-13
Core Bug Fixes
-
Fixed an issue where an archive-push error would not be retried and would instead return errors to PostgreSQL indefinitely (unless the
.errorfile was manually deleted). -
Fixed a race condition in parallel archiving where creation of new paths generated an error when multiple processes attempted to do so at the same time.
Core Improvements
- Improved performance of
wal archive min/maxprovided by theinfocommand.
Documentation Features
- Updated async archiving documentation to more accurately describe how the new method works and how it differs from the old method.
Documentation Development
-
Documentation can now be built with reusable blocks to reduce duplication.
-
Improved support for
--requireoption and section depends now default to the previous section. -
Added ability to pass options to containers within the documentation.
-
Add
propertag to slightly emphasize proper nouns.
v1.13 — Parallel Archiving, Stanza Create, Improved Info and Check
Released: 2017-02-05
Core Bug Fixes
-
Fixed const assignment giving compiler warning in C library.
-
Fixed a few directory syncs that were missed for the
--repo-syncoption. -
Fixed an issue where a missing user/group on restore could cause an "uninitialized value" error in
File->owner(). -
Fixed an issue where protocol mismatch errors did not output the expected value.
-
Fixed a spurious
archive-getlog message that indicated an exit code of 1 was an abnormal termination.
Core Features
-
Improved, multi-process implementation of asynchronous archiving.
-
Improved
stanza-createcommand so that it can repair broken repositories in most cases and is robust enough to be made mandatory. -
Improved
checkcommand to run on a standby, though only basic checks are done becausepg_switch_xlog()cannot be executed on a replica. -
Added archive and backup WAL ranges to the
infocommand. -
Added warning to update
pg_tablespace.spclocationwhen remapping tablespaces in PostgreSQL < 9.2. -
Remove remote lock requirements for the
archive-get,restore,info, andcheckcommands since they are read-only operations.
Core Improvements
-
Log file banner is not output until the first log entry is written.
-
Reduced the likelihood of torn pages causing a false positive in page checksums by filtering on start backup LSN.
-
Remove Intel-specific optimization from C library build flags.
-
Remove
--lockoption. This option was introduced before the lock directory could be located outside the repository and is now obsolete. -
Added
--log-timestampoption to allow timestamps to be suppressed in logging. This is primarily used to avoid filters in the automated documentation. -
Return proper error code when unable to convert a relative path to an absolute path.
Core Development
-
Refactor
FileandBackupCommonmodules to improve test coverage. -
Moved
File->manifest()into theFileCommon.pmmodule. -
Moved the
Archivemodules to theArchivedirectory and split thearchive-getandarchive-pushcommands into separate modules. -
Split the
checkcommand out of theArchive.pmmodule. -
Allow logging to be suppressed via
logDisable()andlogEnable(). -
Allow for locks to be taken more than once in the same process without error.
-
Lock directories can be created when more than one directory level is required.
-
Clean up
optionValid()/optionTest()logic inLock.pm. -
Added
Exception::exceptionCode()andException::exceptionMessage()to simplify error handling logic. -
Represent
.gzextension with a constant. -
Allow empty files to be created with
FileCommon::fileStringWrite()and use temp files to avoid partial reads. -
Refactor process IO and process master/minion code out from the common protocol code.
-
Fixed alignment issues with multiline logging.
Documentation Features
- Added documentation to the User Guide for the
process-maxoption.
Documentation Development
- Update LICENSE.txt for 2017.
Test Development
-
Fixed
--no-onlinetests to suppress expected errors. -
Added integration for testing coverage with
Devel::Cover. -
Added unit tests for low-level functions in the
FileandBackupCommonmodules. -
C Library builds only run when C library has actually changed.
-
Added more flexibility in initializing and cleaning up after modules and tests.
-
testResult()suppresses logging and reports exceptions. -
testException()allows messages to be matched with regular expressions. -
Split test modules into separate files to make the code more maintainable. Tests are dynamically loaded by name rather than requiring an if-else block.
-
Allow multiple
--module,--test, and--runoptions to be used fortest.pl. -
Added expect log expression to replace year subdirectories in
backup.history. -
Refactor name/locations of common modules that setup test environments.
v1.12 — Page Checksums, Configuration, and Bug Fixes
Released: 2016-12-12
Core Bug Fixes
-
Fixed an issue where options that were invalid for the specified command could be provided on the command-line without generating an error. The options were ignored and did not cause any change in behavior, but it did lead to some confusion. Invalid options will now generate an error.
-
Fixed an issue where internal symlinks were not being created for tablespaces in the repository. This issue was only apparent when trying to bring up clusters in-place manually using filesystem snapshots and did not affect normal backup and restore.
-
Fixed an issue that prevented errors from being output to the console before the logging system was initialized, i.e. while parsing options. Error codes were still being returned accurately so this would not have made a process look like it succeeded when it did not.
-
Fixed an issue where the
db-portoption specified on the backup server would not be properly passed to the remote unless it was from the first configured database.
Core Features
-
Added the
--checksum-pageoption to allow pgBackRest to validate page checksums in data files when checksums are enabled on PostgreSQL >= 9.3. Note that this functionality requires a C library which may not initially be available in OS packages. The option will automatically be enabled when the library is present and checksums are enabled on the cluster. -
Added the
--repo-linkoption to allow internal symlinks to be suppressed when the repository is located on a filesystem that does not support symlinks. This does not affect any pgBackRest functionality, but the convenience linklatestwill not be created and neither will internal tablespace symlinks, which will affect the ability to bring up clusters in-place manually using filesystem snapshots. -
Added the
--repo-syncoption to allow directory syncs in the repository to be disabled for file systems that do not support them, e.g. NTFS. -
Added a predictable log entry to signal that a command has completed successfully. For example a backup ends successfully with:
INFO: backup command end: completed successfully.
Core Improvements
- For simplicity, the
pg_controlfile is now copied with the rest of the files instead of by itself of at the end of the process. Thebackupcommand does not require this behavior and therestorecopies to a temporary file which is renamed at the end of the restore.
Core Development
-
Abstracted code to determine which database cluster is the primary and which are standbys.
-
Improved consistency and flexibility of the protocol layer by using JSON for all messages.
-
File copy protocol now accepts a function that can do additional processing on the copy buffers and return a result to the calling process.
-
Improved
IO->bufferReadto always return requested number of bytes until EOF. -
Simplified the result hash of
File->manifest(),Db->tablespaceMapGet(), andDb->databaseMapGet(). -
Improved errors returned from child processes by removing redundant error level and code.
-
Code cleanup in preparation for improved
stanza-createcommand. -
Improved parameter/result logging in debug/trace functions.
Documentation Bug Fixes
-
Fixed an issue that suppressed exceptions in PDF builds.
-
Fixed regression in section links introduced in v1.10.
Documentation Features
- Added Retention to QuickStart section.
Documentation Development
-
Allow a source to be included as a section so large documents can be broken up.
-
Added section link support to Markdown output.
-
Added list support to PDF output.
-
Added
includeoption to explicitly build sources (complements theexcludeoption though both cannot be used in the same invocation). -
Added
keyword-addoption to add keywords without overriding thedefaultkeyword. -
Added
debugoption todoc.plto easily add thedebugkeyword to documentation builds. -
Added
preoption todoc.plto easily add theprekeyword to documentation builds. -
Builds in
release.plnow remove all docker containers to get consistent IP address assignments. -
Improvements to markdown rendering.
-
Remove code dependency on
projectvariable, instead usetitleparam.
Test Development
-
Removed erroneous
--no-configoption inhelptest module. -
Update control and WAL test files to
9.4with matching system identifiers. -
Improved exception handling in file unit tests.
-
Changed the
--no-forktest option to--forkwith negation to match all other boolean parameters. -
Various improvements to validation of backup and restore.
-
Add more realistic data files to synthetic backup and restore tests.
v1.11 — Bug Fix for Asynchronous Archiving Efficiency
Released: 2016-11-17
Core Bug Fixes
- Fixed an issue where asynchronous archiving was transferring one file per execution instead of transferring files in batches. This regression was introduced in v1.09 and affected efficiency only, all WAL segments were correctly archived in asynchronous mode.
v1.10 — Stanza Creation and Minor Bug Fixes
Released: 2016-11-08
Core Bug Fixes
-
Fixed an issue where a backup could error if no changes were made to a database between backups and only
pg_controlchanged. -
Fixed an issue where tablespace paths with the same prefix would cause an invalid link error.
Core Features
- Added the
stanza-createcommand to formalize creation of stanzas in the repository.
Core Improvements
- Removed extraneous
use libdirectives from Perl modules.
Documentation Development
-
Fixed missing variable replacements.
-
Removed hard-coded host names from configuration file paths.
-
Allow command-line length to be configured using
cmd-line-lenparam. -
Added
compactparam to allow CSS to be embedded in HTML file. -
Added
prettyparam to produce HTML with proper indenting. -
Only generate HTML menu when required and don't require index page.
-
Assign numbers to sections by default.
-
VM mount points are now optional.
v1.09 — 9.6 Support, Configurability, and Bug Fixes
Released: 2016-10-10
Core Bug Fixes
-
Fixed the
checkcommand to prevent an error message from being logged if the backup directory does not exist. -
Fixed error message to properly display the archive command when an invalid archive command is detected.
-
Fixed an issue where the async archiver would not be started if
archive-pushdid not have enough space to queue a new WAL segment. This meant that the queue would never be cleared without manual intervention (such as callingarchive-pushdirectly). PostgreSQL now receives errors when there is not enough space to store new WAL segments but the async process will still be started so that space is eventually freed. -
Fixed a remote timeout that occurred when a local process generated checksums (during resume or restore) but did not copy files, allowing the remote to go idle.
Core Features
-
Non-exclusive backups will automatically be used on PostgreSQL 9.6.
-
Added the
cmd-sshoption to allow the ssh client to be specified. -
Added the
log-level-stderroption to control whether console log messages are sent tostderrorstdout. By default this is set towarnwhich represents a change in behavior from previous versions, even though it may be more intuitive. Settinglog-level-stderr=offwill preserve the old behavior. -
Set
application_nameto"pgBackRest [command]"for database connections. -
Check that archive_mode is enabled when
archive-checkoption enabled.
Core Improvements
-
Clarified error message when unable to acquire pgBackRest advisory lock to make it clear that it is not a PostgreSQL backup lock.
-
pgBackRest version number included in command start INFO log output.
-
Process ID logged for local process start/stop INFO log output.
Documentation Features
- Added
archive-timeoutoption documentation to the user guide.
Documentation Development
- Added
devoption todoc.plto easily add thedevkeyword to documentation builds.
Test Development
-
Update CentOS/Debian package definitions.
-
Fixed missing expect output for help module.
-
Fixed broken
vm-maxoption intest.pl. -
Regression tests can now be run as any properly-configured user, not just vagrant.
-
Minimize TeXLive package list to save time during VM builds.
v1.08 — Bug Fixes and Log Improvements
Released: 2016-09-14
Core Bug Fixes
-
Fixed an issue where local processes were not disconnecting when complete and could later timeout.
-
Fixed an issue where the protocol layer could timeout while waiting for WAL segments to arrive in the archive.
Core Improvements
- Cache file log output until the file is created to create a more complete log.
Documentation Development
- Show Process ID in output instead of filtering it out with the timestamp.
Test Development
-
Suppress "dpkg-reconfigure: unable to re-open stdin: No file or directory" warning in Vagrant VM build.
-
Show Process ID in expect logs instead of filtering it out with the timestamp.
v1.07 — Thread to Process Conversion and Bug Fixes
Released: 2016-09-07
Core Bug Fixes
-
Fixed an issue where tablespaces were copied from the primary during standby backup.
-
Fixed the
checkcommand so backup info is checked remotely and not just locally. -
Fixed an issue where
retention-archivewas not automatically being set whenretention-archive-type=diff, resulting in a less aggressive than intended expiration of archive.
Core Features
-
Converted Perl threads to processes to improve compatibility and performance.
-
Exclude contents of
$PGDATA/pg_replslotdirectory so that replication slots on the primary do not become part of the backup. -
The
archive-startandarchive-stopsettings are now filled inbackup.manifesteven whenarchive-check=n. -
Additional warnings when archive retention settings may not have the intended effect or would allow indefinite retention.
-
Experimental support for non-exclusive backups in PostgreSQL 9.6 rc1. Changes to the control/catalog/WAL versions in subsequent release candidates may break compatibility but pgBackRest will be updated with each release to keep pace.
Core Development
-
Refactor of protocol minions in preparation for the new local minion.
-
Remove obsolete thread index variable from
File()module. -
Changed temporary file names to consistently use the
.pgbackrest.tmpextension even if the destination file is compressed or has an appended checksum. -
Improve ASSERT error handling, safely check eval blocks, and convert
$@to$EVAL_ERROR.
Documentation Bug Fixes
- Fixed minor documentation reproducibility issues related to binary paths.
Documentation Features
- Documentation for archive retention.
Documentation Development
- Suppress TOC for unsupported versions of pgBackRest.
Test Development
- New vagrant base box and make uid/gid selection for containers dynamic.
v1.06 — Backup from Standby and Bug Fixes
Released: 2016-08-25
Core Bug Fixes
-
Fixed an issue where a tablespace link that referenced another link would not produce an error, but instead skip the tablespace entirely.
-
Fixed an issue where options that should not allow multiple values could be specified multiple times in
pgbackrest.confwithout an error being raised. -
Fixed an issue where the
protocol-timeoutoption was not automatically increased when thedb-timeoutoption was increased.
Core Features
-
Backup from a standby cluster. A connection to the primary cluster is still required to start/stop the backup and copy files that are not replicated, but the vast majority of files are copied from the standby in order to reduce load on the primary.
-
More flexible configuration for databases. Master and standby can both be configured on the backup server and pgBackRest will automatically determine which is the primary. This means no configuration changes for backup are required after failing over from a primary to standby when a separate backup server is used.
-
Exclude directories during backup that are cleaned, recreated, or zeroed by PostgreSQL at startup. These include
pgsql_tmpandpg_stat_tmp. Thepostgresql.auto.conf.tmpfile is now excluded in addition to files that were already excluded:backup_label.old,postmaster.opts,postmaster.pid,recovery.conf,recovery.done. -
Experimental support for non-exclusive backups in PostgreSQL 9.6 beta4. Changes to the control/catalog/WAL versions in subsequent betas may break compatibility but pgBackRest will be updated with each release to keep pace.
Core Improvements
-
Improve error message for links that reference links in manifest build.
-
Added hints to error message when relative paths are detected in
archive-pushorarchive-get. -
Improve backup log messages to indicate which host the files are being copied from.
Core Development
-
Simplify protocol creation and identifying which host is local/remote.
-
Removed all
OP_*function constants that were used only for debugging, not in the protocol, and replaced with__PACKAGE__. -
Improvements in
Dbmodule: separated outconnect()function, allowexecuteSql()calls that do not return data, and improve error handling.
Documentation Development
- Improve host tag rendering.
Test Development
-
Refactor db version constants into a separate module.
-
Update synthetic backup tests to PostgreSQL 9.4.
v1.05 — Bug Fix for Tablespace Link Checking
Released: 2016-08-09
Core Bug Fixes
- Fixed an issue where tablespace paths that had $PGDATA as a substring would be identified as a subdirectories of $PGDATA even when they were not. Also hardened relative path checking a bit.
Documentation Features
- Added documentation for scheduling backups with cron.
Documentation Improvements
- Moved the backlog from the pgBackRest website to the GitHub repository wiki.
Documentation Development
- Improved rendering of spaces in code blocks.
v1.04 — Various Bug Fixes
Released: 2016-07-30
Core Bug Fixes
-
Fixed an issue an where an extraneous remote was created causing threaded backup/restore to possibly timeout and/or throw a lock conflict.
-
Fixed an issue where db-path was not required for the
checkcommand so an assert was raised when it was missing rather than a polite error message. -
Fixed
checkcommand to throw an error when database version/id does not match that of the archive. -
Fixed an issue where a remote could try to start its own remote when the
backup-hostoption was not present inpgbackrest.confon the database server. -
Fixed an issue where the contents of
pg_xlogwere being backed up if the directory was symlinked. This didn't cause any issues during restore but was a waste of space. -
Fixed an invalid
log()call in lock routines.
Core Features
- Experimental support for non-exclusive backups in PostgreSQL 9.6 beta3. Changes to the control/catalog/WAL versions in subsequent betas may break compatibility but pgBackRest will be updated with each release to keep pace.
Core Improvements
-
Suppress banners on SSH protocol connections.
-
Improved remote error messages to identify the host where the error was raised.
-
All remote types now take locks. The exceptions date to when the test harness and pgBackRest were running in the same VM and no longer apply.
Core Development
-
Enhancements to the protocol layer for improved reliability and error handling.
-
Exceptions are now passed back from threads as messages when possible rather than raised directly.
-
Temp files created during backup are now placed in the same directory as the target file.
-
Output lock file name when a lock cannot be acquired to aid in debugging.
-
Reduce calls to
protocolGet()in backup/restore.
Documentation Features
-
Added clarification on why the default for the
backrest-useroption isbackrest. -
Updated information about package availability on supported platforms.
Documentation Development
-
Added
release.plto make releases reproducible. For now this only includes building and deploying documentation. -
HTML footer dates are statically created in English in order to be reproducible.
Test Development
-
Fixed a version checking issue in
test.pl. -
Fixed an issue where multi-threaded tests were not being run when requested.
-
Reduce the frequency that certain tests are run to save time in regression.
-
Disable control master for older OS versions where it is less stable.
v1.03 — Check Command and Bug Fixes
Released: 2016-07-02
Core Bug Fixes
-
Fixed an issue where
keep-alivescould be starved out by lots of small files during multi-threadedbackup. They were also completely absent from single/multi-threadedbackupresume andrestorechecksumming. -
Fixed an issue where the
expirecommand would refuse to run when explicitly called from the command line if thedb-hostoption was set. This was not an issue whenexpirewas run automatically after abackup -
Fixed an issue where validation was being running on
archive_commandeven when thearchive-checkoption was disabled.
Core Features
-
Added
checkcommand to validate that pgBackRest is configured correctly for archiving and backups. -
Added the
protocol-timeoutoption. Previouslyprotocol-timeoutwas set asdb-timeout+ 30 seconds. -
Failure to shutdown remotes at the end of the backup no longer throws an exception. Instead a warning is generated that recommends a higher
protocol-timeout. -
Experimental support for non-exclusive backups in PostgreSQL 9.6 beta2. Changes to the control/catalog/WAL versions in subsequent betas may break compatibility but pgBackRest will be updated with each release to keep pace.
Core Improvements
-
Improved handling of users/groups captured during backup that do not exist on the restore host. Also explicitly handle the case where user/group is not mapped to a name.
-
Option handling is now far more strict. Previously it was possible for a command to use an option that was not explicitly assigned to it. This was especially true for the
backup-hostanddb-hostoptions which are used to determine locality.
Core Development
-
The
pg_xlogfile_name()function is no longer used to construct WAL filenames from LSNs. While this function is convenient it is not available on a standby. Instead, the archive is searched for the LSN in order to find the timeline. If due to some misadventure the LSN appears on multiple timelines then an error will be thrown, whereas before this condition would have passed unnoticed. -
Changed version variable to a constant. It had originally been designed to play nice with a specific packaging tool but that tool was never used.
Documentation Improvements
-
Allow a static date to be used for documentation to generate reproducible builds.
-
Added documentation for asynchronous archiving to the user guide.
-
Recommended install location for pgBackRest modules is now
/usr/share/perl5since/usr/lib/perl5has been removed from the search path in newer versions of Perl. -
Added instructions for removing prior versions of pgBackRest.
Documentation Development
-
Fixed DTD search path that did not work properly when
--doc-pathwas used. -
Fixed pgBackRest-specific xml that was loaded for non-pgBackRest projects.
-
Fixed section names being repeated in the info output when multiple
--requireoptions depended on the same sections. -
Fixed pgBackRest config sections being blank in the output when not loaded from cache.
-
Allow hidden options to be added to a command. This allows certain commands (like
apt-get) to be forced during the build without making that a part of the documentation. -
Allow command summaries to be inserted anywhere in the documentation to avoid duplication.
-
Update TeX Live to 2016 version.
-
New, consolidated implementation for link rendering.
-
PostgreSQL version is now a variable to allow multi-version documentation.
Test Development
-
Obsolete containers are removed by the
--vm-forceoption. -
Major refactor of the test suite to make it more modular and object-oriented. Multiple Docker containers can now be created for a single test to simulate more realistic environments. Tests paths have been renamed for clarity.
-
Greatly reduced the quantity of Docker containers built by default. Containers are only built for PostgreSQL versions specified in
db-minimaland those required to build documentation. Additional containers can be built with--db-version=allor by specifying a version, e.g.--db-version=9.4.
v1.02 — Bug Fix for Perl 5.22
Released: 2016-06-02
Core Bug Fixes
- Fix usage of sprintf() due to new constraints in Perl 5.22. Parameters not referenced in the format string are no longer allowed.
Core Development
- Log directory create and file open now using FileCommon functions which produce more detailed error messages on failure.
Documentation Bug Fixes
-
Fixed syntax that was not compatible with Perl 5.2X.
-
Fixed absolute paths that were used for the PDF logo.
Documentation Features
-
Release notes are now broken into sections so that bugs, features, and refactors are clearly delineated. An "Additional Notes" section has been added for changes to documentation and the test suite that do not affect the core code.
-
Added man page generation.
-
The change log was the last piece of documentation to be rendered in Markdown only. Wrote a converter so the document can be output by the standard renderers. The change log will now be located on the website and has been renamed to "Releases".
Documentation Development
-
Added an execution cache so that documentation can be generated without setting up the full container environment. This is useful for packaging, keeps the documentation consistent for a release, and speeds up generation when no changes are made in the execution list.
-
Remove function constants and pass strings directly to logDebugParam(). The function names were only used once so creating constants for them was wasteful.
-
Lists can now be used outside of
pandtexttags for more flexible document structuring.
Test Development
-
Replaced overzealous
perl -cWcheck which failed on Perl 5.22 withperl -cw. -
Added Ubuntu 16.04 (Xenial) and Debian 8 (Jessie) to the regression suite.
-
Upgraded doc/test VM to Ubuntu 16.04. This will help catch Perl errors in the doc code since it is not run across multiple distributions like the core and test code. It is also to be hoped that a newer kernel will make Docker more stable.
-
Test release version against the executable using
change-log.xmlinstead ofCHANGELOG.md.
v1.01 — Enhanced Info, Selective Restore, and 9.6 Support
Released: 2016-05-17
Core Features
-
Enhanced text output of
infocommand to include timestamps, sizes, and the reference list for all backups. -
Allow selective restore of databases from a cluster backup. This feature can result in major space and time savings when only specific databases are restored. Unrestored databases will not be accessible but must be manually dropped before they will be removed from the shared catalogue.
-
Experimental support for non-exclusive backups in PostgreSQL 9.6 beta1. Changes to the control/catalog/WAL versions in subsequent betas may break compatibility but pgBackRest will be updated with each release to keep pace.
v1.00 — New Repository Format and Configuration Scheme, Link Support
Released: 2016-04-14
Core Features
-
Implemented a new configuration scheme which should be far simpler to use. See the User Guide and Configuration Reference for details but for a simple configuration all options can now be placed in the
stanzasection. Options that are shared between stanzas can be placed in the[global]section. More complex configurations can still make use of command sections though this should be a rare use case. -
The
repo-pathoption now always refers to the repository where backups and archive are stored, whether local or remote, so therepo-remote-pathoption has been removed. The newspool-pathoption can be used to define a location for queueing WAL segments when archiving asynchronously. A local repository is no longer required. -
The default configuration filename is now
pgbackrest.confinstead ofpg_backrest.conf. This was done for consistency with other naming changes but also to prevent old config files from being loaded accidentally when migrating to1.00. -
The default repository name was changed from
/var/lib/backupto/var/lib/pgbackrest. -
Lock files are now stored in
/tmp/pgbackrestby default. These days/run/pgbackrestis the preferred location but that would require init scripts which are not part of this release. Thelock-pathoption can be used to configure the lock directory. -
Log files are now stored in
/var/log/pgbackrestby default and no longer have the date appended so they can be managed withlogrotate. Thelog-pathoption can be used to configure the log directory. -
Executable filename changed from
pg_backresttopgbackrest. -
All files and directories linked from PGDATA are now included in the backup. By default links will be restored directly into PGDATA as files or directories. The
--link-alloption can be used to restore all links to their original locations. The--link-mapoption can be used to remap a link to a new location. -
Removed
--tablespaceoption and replaced with--tablespace-map-alloption which should more clearly indicate its function. -
Added
detaillog level which will output more information thaninfowithout being as verbose asdebug.
v0.92 — Command-line Repository Path Fix
Released: 2016-04-06
Core Bug Fixes
- Fixed an issue where the master process was passing
--repo-remote-pathinstead of--repo-pathto the remote and causing the lock files to be created in the default repository directory (/var/lib/backup), generally ending in failure. This was only an issue when--repo-remote-pathwas defined on the command line rather than inpg_backrest.conf.
v0.91 — Tablespace Bug Fix and Minor Enhancements
Released: 2016-03-22
Core Bug Fixes
- Fixed repository incompatibility introduced in pgBackRest 0.90.
Core Features
-
Copy
global/pg_controllast during backups. -
Write
.infoand.manifestfiles to temp before moving them to their final locations and fsync'ing. -
Rename
--no-start-stopoption to--no-online.
Test Features
- Static source analysis using Perl-Critic, currently passes on gentle.
v0.90 — 9.5 Support, Various Enhancements, and Minor Bug Fixes
Released: 2016-02-07
Core Bug Fixes
-
Fixed an issue where specifying
--no-archive-checkwould throw a configuration error. -
Fixed an issue where a temp WAL file left over after a well-timed system crash could cause the next
archive-pushto fail. -
The
retention-archiveoption can now be be safely set to less than backup retention (retention-fullorretention-diff) without also specifyingarchive-copy=n. The WAL required to make the backups that fall outside of archive retention consistent will be preserved in the archive. However, in this case PITR will not be possible for the backups that fall outside of archive retention.
Core Features
-
When backing up and restoring tablespaces pgBackRest only operates on the subdirectory created for the version of PostgreSQL being run against. Since multiple versions can live in a tablespace (especially during a binary upgrade) this prevents too many files from being copied during a backup and other versions possibly being wiped out during a restore. This only applies to PostgreSQL >= 9.0 — prior versions of PostgreSQL could not share a tablespace directory.
-
Generate an error when
archive-check=ybutarchive_commanddoes not executepg_backrest. -
Improved error message when
repo-pathorrepo-remote-pathdoes not exist. -
Added checks for
--deltaand--forcerestore options to ensure that the destination is a valid $PGDATA directory. pgBackRest will check for the presence ofPG_VERSIONorbackup.manifest(left over from an aborted restore). If neither file is found then--deltaand--forcewill be disabled but the restore will proceed unless there are files in the $PGDATA directory (or any tablespace directories) in which case the operation will be aborted. -
When restore
--set=latest(the default) the actual backup restored will be output to the log. -
Support for PostgreSQL 9.5 partial WAL segments and
recovery_target_actionsetting. Thearchive_mode = 'always'setting is not yet supported. -
Support for
recovery_target = 'immediate'recovery setting introduced in PostgreSQL 9.4. -
The following tablespace checks have been added: paths or files in pg_tblspc, relative links in pg_tblspc, tablespaces in $PGDATA. All three will generate errors.
Documentation Development
- Fixed an issue where document generation failed because some OSs are not tolerant of having multiple installed versions of PostgreSQL. A separate VM is now created for each version. Also added a sleep after database starts during document generation to ensure the database is running before the next command runs.
v0.89 — Timeout Bug Fix and Restore Read-Only Repositories
Released: 2015-12-24
Core Bug Fixes
- Fixed an issue where longer-running backups/restores would timeout when remote and threaded. Keepalives are now used to make sure the remote for the main process does not timeout while the thread remotes do all the work. The error message for timeouts was also improved to make debugging easier.
Core Features
- Allow restores to be performed on a read-only repository by using
--no-lockand--log-level-file=off. The--no-lockoption can only be used with restores.
Documentation Development
- Minor styling changes, clarifications and rewording in the user guide.
Test Development
- The dev branch has been renamed to master and for the time being the master branch has renamed to release, though it will probably be removed at some point -- thus ends the gitflow experiment for pgBackRest. It is recommended that any forks get re-forked and clones get re-cloned.
v0.88 — Documentation and Minor Bug Fixes
Released: 2015-11-22
Core Bug Fixes
-
Fixed an issue where the
start/stopcommands required the--configoption. -
Fixed an issue where log files were being overwritten instead of appended.
-
Fixed an issue where
backup-userwas not optional.
Core Features
-
Symlinks are no longer created in backup directories in the repository. These symlinks could point virtually anywhere and potentially be dangerous. Symlinks are still recreated during a restore.
-
Added better messaging for backup expiration. Full and differential backup expirations are logged on a single line along with a list of all dependent backups expired.
-
Archive retention is automatically set to full backup retention if not explicitly configured.
Documentation Features
- Added documentation in the user guide for delta restores, expiration, dedicated backup hosts, starting and stopping pgBackRest, and replication.
v0.87 — Website and User Guide
Released: 2015-10-28
Core Features
- The
backup_label.oldandrecovery.donefiles are now excluded from backups.
Documentation Features
- Added a new user guide that covers pgBackRest basics and some advanced topics including PITR. Much more to come, but it's a start.
Documentation Development
- The website, markdown, and command-line help are now all generated from the same XML source.
v0.85 — Start/Stop Commands and Minor Bug Fixes
Released: 2015-10-08
Core Bug Fixes
-
Fixed an issue where an error could be returned after a backup or restore completely successfully.
-
Fixed an issue where a resume would fail if temp files were left in the root backup directory when the backup failed. This scenario was likely if the backup process got terminated during the copy phase.
Core Features
-
Added
stopandstartcommands to prevent pgBackRest processes from running on a system where PostgreSQL is shutdown or the system needs to be quiesced for some other reason. -
Experimental support for PostgreSQL 9.5 beta1. This may break when the control version or WAL magic changes in future versions but will be updated in each pgBackRest release to keep pace. All regression tests pass except for
--target-resumetests (this functionality has changed in 9.5) and there is no testing yet for.partialWAL segments.
Core Development
- Removed dependency on
IO::Stringmodule.
v0.82 — Refactoring, Command-line Help, and Minor Bug Fixes
Released: 2015-09-14
Core Bug Fixes
-
Fixed an issue where resumed compressed backups were not preserving existing files.
-
Fixed an issue where resume and incr/diff would not ensure that the prior backup had the same compression and hardlink settings.
-
Fixed an issue where a cold backup using
--no-start-stopcould be started on a running PostgreSQL cluster without--forcespecified. -
Fixed an issue where a thread could be started even when none were requested.
-
Fixed an issue where the pgBackRest version number was not being updated in
backup.infoandarchive.infoafter an upgrade/downgrade. -
Fixed an issue where the
infocommand was throwing an exception when the repository contained no stanzas. -
Fixed an issue where the PostgreSQL
pg_stop_backup()NOTICEs were being output tostderr.
Core Features
- Experimental support for PostgreSQL 9.5 alpha2. This may break when the control version or WAL magic changes in future versions but will be updated in each pgBackRest release to keep pace. All regression tests pass except for
--target-resumetests (this functionality has changed in 9.5) and there is no testing yet for.partialWAL segments.
Core Improvements
-
Renamed
recovery-settingoption and section torecovery-optionto be more consistent with pgBackRest naming conventions. -
Added dynamic module loading to speed up commands, especially asynchronous archiving.
Core Development
- Code cleanup and refactoring to standardize on patterns that have evolved over time.
Documentation Features
- Command-line help is now extracted from the same XML source that is used for the other documentation and includes much more detail.
Test Development
- Expiration tests are now synthetic rather than based on actual backups. This will allow development of more advanced expiration features.
v0.80 — DBI Support, Stability, and Convenience Features
Released: 2015-08-09
Core Bug Fixes
-
Fixed an issue that caused the formatted timestamp for both the oldest and newest backups to be reported as the current time by the
infocommand. Onlytextoutput was affected --jsonoutput reported the correct epoch values. -
Fixed protocol issue that was preventing ssh errors (especially on connection) from being logged.
Core Features
-
The repository is now created and updated with consistent directory and file modes. By default
umaskis set to0000but this can be disabled with theneutral-umasksetting. -
Added the
stop-autooption to allow failed backups to automatically be stopped when a new backup starts. -
Added the
db-timeoutoption to limit the amount of time pgBackRest will wait forpg_start_backup()andpg_stop_backup()to return. -
Remove
pg_controlfile at the beginning of the restore and copy it back at the very end. This prevents the possibility that a partial restore can be started by PostgreSQL. -
Added checks to be sure the
db-pathsetting is consistent withdb-portby comparing thedata_directoryas reported by the cluster against thedb-pathsetting and the version as reported by the cluster against the value read frompg_control. Thedb-socket-pathsetting is checked to be sure it is an absolute path. -
Experimental support for PostgreSQL 9.5 alpha1. This may break when the control version or WAL magic changes in future versions but will be updated in each pgBackRest release to keep pace. All regression tests pass except for
--target-resumetests (this functionality has changed in 9.5) and there is no testing yet for.partialWAL segments.
Core Improvements
- Now using Perl
DBIandDBD::Pgfor connections to PostgreSQL rather thanpsql. Thecmd-psqlandcmd-psql-optionsettings have been removed and replaced withdb-portanddb-socket-path. Follow the instructions in the Installation Guide to installDBD::Pgon your operating system.
Core Development
- Major refactoring of the protocol layer to support future development.
Documentation Development
-
Split most of
README.mdout intoUSERGUIDE.mdandCHANGELOG.mdbecause it was becoming unwieldy. Changed most references to "database" in the user guide to "database cluster" for clarity. -
Changed most references to "database" in the user guide to "database cluster" for clarity.
Test Features
- Added vagrant test configurations for Ubuntu 14.04 and CentOS 7.
v0.78 — Remove CPAN Dependencies, Stability Improvements
Released: 2015-07-13
Core Improvements
-
Removed dependency on CPAN packages for multi-threaded operation. While it might not be a bad idea to update the
threadsandThread::Queuepackages, it is no longer necessary. -
Modified wait backoff to use a Fibonacci rather than geometric sequence. This will make wait time grow less aggressively while still giving reasonable values.
Test Features
- Added vagrant test configurations for Ubuntu 12.04 and CentOS 6.
Test Development
- More options for regression tests and improved code to run in a variety of environments.
v0.77 — CentOS/RHEL 6 Support and Protocol Improvements
Released: 2015-06-30
Core Features
-
Added file and directory syncs to the
Fileobject for additional safety during backup/restore and archiving. -
Added support for Perl 5.10.1 and OpenSSH 5.3 which are default for CentOS/RHEL 6.
-
Improved error message when backup is run without
archive_commandset and without--no-archive-checkspecified.
Core Development
-
Removed
pg_backrest_remoteand added the functionality topg_backrestas theremotecommand. -
Moved version number out of the
VERSIONfile toVersion.pmto better support packaging. -
Replaced
IPC::System::SimpleandNet::OpenSSHwithIPC::Open3to eliminate CPAN dependency for multiple operating systems.
v0.75 — New Repository Format, Info Command and Experimental 9.5 Support
Released: 2015-06-14
Core Features
-
Added the
infocommand. -
Logging now uses unbuffered output. This should make log files that are being written by multiple threads less chaotic.
-
Experimental support for PostgreSQL 9.5. This may break when the control version or WAL magic changes but will be updated in each release.
Core Improvements
- More efficient file ordering for
backup. Files are copied in descending size order so a single thread does not end up copying a large file at the end. This had already been implemented forrestore.
v0.70 — Stability Improvements for Archiving, Improved Logging and Help
Released: 2015-06-01
Core Bug Fixes
-
Fixed an issue where
archive-copywould fail on an incr/diff backup whenhardlink=n. In this case thepg_xlogpath does not already exist and must be created. -
Fixed an issue in async archiving where
archive-pushwas not properly returning 0 whenarchive-max-mbwas reached and moved the async check after transfer to avoid having to remove the stop file twice. Also added unit tests for this case and improved error messages to make it clearer to the user what went wrong. -
Fixed a locking issue that could allow multiple operations of the same type against a single stanza. This appeared to be benign in terms of data integrity but caused spurious errors while archiving and could lead to errors in backup/restore.
Core Features
-
Allow duplicate WAL segments to be archived when the checksum matches. This is necessary for some recovery scenarios.
-
Allow comments/disabling in
pg_backrest.confusing the#character. Only#characters in the first character of the line are honored. -
Better logging before
pg_start_backup()to make it clear when the backup is waiting on a checkpoint. -
Various command behavior and logging fixes.
Core Improvements
- Replaced
JSONmodule withJSON::PPwhich ships with core Perl.
Documentation Bug Fixes
- Various help fixes.
v0.65 — Improved Resume and Restore Logging, Compact Restores
Released: 2015-05-11
Core Bug Fixes
- Fixed an issue where an absolute path was not written into
recovery.confwhen the restore was run with a relative path.
Core Features
-
Better resume support. Resumed files are checked to be sure they have not been modified and the manifest is saved more often to preserve checksums as the backup progresses. More unit tests to verify each resume case.
-
Resume is now optional. Use the
resumesetting or--no-resumefrom the command line to disable. -
More info messages during restore. Previously, most of the restore messages were debug level so not a lot was output in the log.
-
Added
tablespacesetting to allow tablespaces to be restored into thepg_tblspcpath. This produces compact restores that are convenient for development, staging, etc. Currently these restores cannot be backed up as pgBackRest expects only links in thepg_tblspcpath.
v0.61 — Bug Fix for Uncompressed Remote Destination
Released: 2015-04-21
Core Bug Fixes
- Fixed a buffering error that could occur on large, highly-compressible files when copying to an uncompressed remote destination. The error was detected in the decompression code and resulted in a failed backup rather than corruption so it should not affect successful backups made with previous versions.
v0.60 — Better Version Support and WAL Improvements
Released: 2015-04-19
Core Bug Fixes
- Pushing duplicate WAL now generates an error. This worked before only if checksums were disabled.
Core Features
- Database System IDs are used to make sure that all WAL in an archive matches up. This should help prevent misconfigurations that send WAL from multiple clusters to the same archive.
Core Development
- Improved threading model by starting threads early and terminating them late.
Test Features
- Regression tests working back to PostgreSQL 8.3.
v0.50 — Restore and Much More
Released: 2015-03-25
Core Bug Fixes
-
Fixed broken checksums and now they work with normal and resumed backups. Finally realized that checksums and checksum deltas should be functionally separated and this simplified a number of things. Issue #28 has been created for checksum deltas.
-
Fixed an issue where a backup could be resumed from an aborted backup that didn't have the same type and prior backup.
Core Features
-
Added restore functionality.
-
All options can now be set on the command-line making
pg_backrest.confoptional. -
De/compression is now performed without threads and checksum/size is calculated in stream. That means file checksums are no longer optional.
-
Added option
--no-start-stopto allow backups when Postgres is shut down. Ifpostmaster.pidis present then--forceis required to make the backup run (though if Postgres is running an inconsistent backup will likely be created). This option was added primarily for the purpose of unit testing, but there may be applications in the real world as well. -
Checksum for
backup.manifestto detect a corrupted/modified manifest. -
Link
latestalways points to the last backup. This has been added for convenience and to make restores simpler.
Core Development
- Removed dependency on
Moose. It wasn't being used extensively and makes for longer startup times.
Test Features
- More comprehensive unit tests in all areas.
v0.30 — Core Restructuring and Unit Tests
Released: 2014-10-05
Core Development
-
Complete rewrite of
BackRest::Filemodule to use a custom protocol for remote operations and Perl native GZIP and SHA operations. Compression is performed in threads rather than forked processes. -
Removed dependency on
Storableand replaced with a custom ini file implementation. -
Numerous other changes that can only be identified with a diff.
Documentation Features
- Added much needed documentation
Test Features
- Fairly comprehensive unit tests for all the basic operations. More work to be done here for sure, but then there is always more work to be done on unit tests.
v0.19 — Improved Error Reporting/Handling
Released: 2014-05-13
Core Bug Fixes
- Found and squashed a nasty bug where
file_copy()was defaulted to ignore errors. There was also an issue infile_exists()that was causing the test to fail when the file actually did exist. Together they could have resulted in a corrupt backup with no errors, though it is very unlikely.
Core Development
- Worked on improving error handling in the
Fileobject. This is not complete, but works well enough to find a few errors that have been causing us problems (notably, find is occasionally failing building the archive async manifest when system is under load).
v0.18 — Return Soft Error When Archive Missing
Released: 2014-04-13
Core Bug Fixes
- The
archive-getcommand now returns a 1 when the archive file is missing to differentiate from hard errors (ssh connection failure, file copy error, etc.) This lets PostgreSQL know that the archive stream has terminated normally. However, this does not take into account possible holes in the archive stream.
v0.17 — Warn When Archive Directories Cannot Be Deleted
Released: 2014-04-03
Core Bug Fixes
- If an archive directory which should be empty could not be deleted backrest was throwing an error. There's a good fix for that coming, but for the time being it has been changed to a warning so processing can continue. This was impacting backups as sometimes the final archive file would not get pushed if the first archive file had been in a different directory (plus some bad luck).
v0.16 — RequestTTY=yes for SSH Sessions
Released: 2014-04-01
Core Bug Fixes
- Added
RequestTTY=yesto ssh sessions. Hoping this will prevent random lockups.
v0.15 — Added archive-get
Released: 2014-03-29
Core Features
-
Added
archive-getfunctionality to aid in restores. -
Added option to force a checkpoint when starting the backup,
start-fast=y.
v0.11 — Minor Fixes
Released: 2014-03-26
Core Bug Fixes
-
Removed
master_stderr_discardoption on database SSH connections. There have been occasional lockups and they could be related to issues originally seen in the file code. -
Changed lock file conflicts on
backupandexpirecommands toERROR. They were set toDEBUGdue to a copy-and-paste from the archive locks.
v0.10 — Backup and Archiving are Functional
Released: 2014-03-05
Core Features
-
No restore functionality, but the backup directories are consistent PostgreSQL data directories. You'll need to either uncompress the files or turn off compression in the backup. Uncompressed backups on a ZFS (or similar) filesystem are a good option because backups can be restored locally via a snapshot to create logical backups or do spot data recovery.
-
Archiving is single-threaded. This has not posed an issue on our multi-terabyte databases with heavy write volume. Recommend a large WAL volume or to use the async option with a large volume nearby.
-
Backups are multi-threaded, but the
Net::OpenSSHlibrary does not appear to be 100% thread-safe so it will very occasionally lock up on a thread. There is an overall process timeout that resolves this issue by killing the process. Yes, very ugly. -
Checksums are lost on any resumed backup. Only the final backup will record checksum on multiple resumes. Checksums from previous backups are correctly recorded and a full backup will reset everything.
-
The
backup.manifestis being written asStorablebecauseConfig::IniFiledoes not seem to handle large files well. Would definitely like to save these as human-readable text.
Documentation Features
- Absolutely no documentation (outside the code). Well, excepting these release notes.