pgBackRest 2.55 commit log

v2.53: Concurrent Backups

commit   : 6e8a45f650e303fe74a1e34ee8e76a193dbc6c4a    
  
author   : David Steele <[email protected]>    
date     : Mon, 22 Jul 2024 09:33:31 +0700    
  
committer: David Steele <[email protected]>    
date     : Mon, 22 Jul 2024 09:33:31 +0700    

Click here for diff

IMPORTANT NOTE: The log-level-stderr option default has been changed from warn to off. This makes it easier to capture errors when only redirecting stdout. To preserve the prior behavior set log-level-stderr=warn.  
  
NOTE TO PACKAGERS: The lz4 library is now required by the meson build.  
  
NOTE TO PACKAGERS: Compiler support for __builtin_clzl() and __builtin_bswap64() is now required by the meson build.  
  
Bug Fixes:  
  
* Fix SFTP renaming failure when file already exists. (Fixed by Reid Thompson. Reviewed by David Steele. Reported by ahmed112212.)  
  
Features:  
  
* Allow backups to run concurrently on different repositories. (Reviewed by Reid Thompson, Stefan Fercot.)  
* Support IP-based SANs for TLS certificate validation. (Contributed by David Christensen. Reviewed by David Steele.)  
  
Improvements:  
  
* Default log-level-stderr option to off. (Reviewed by Greg Sabino Mullane, Stefan Fercot.)  
* Allow alternative WAL segment sizes for PostgreSQL ≤ 10. (Contributed by Viktor Kurilko. Reviewed by David Steele.)  
* Add hint to check SFTP authorization log. (Contributed by Vitalii Zurian. Reviewed by Reid Thompson, David Steele.)  
  
Documentation Improvements:  
  
* Clarify archive-push multi-repo behavior. (Reviewed by Stefan Fercot.)  

M CONTRIBUTING.md
M README.md
M doc/lib/pgBackRestDoc/Custom/DocCustomRelease.pm
M doc/resource/exe.cache
M doc/resource/git-history.cache
M doc/xml/auto/metric-coverage-report.auto.xml
M doc/xml/release.xml
A doc/xml/release/2024/2.52.1.xml
M doc/xml/release/2024/2.53.xml
M meson.build
M src/build/configure.ac
M src/configure
M src/version.h
M test/code-count/file-type.yaml

Fix incorrect examples in doc/test help.

commit   : dea48be06dfcd50f48b205f65e45e4dbefa7c37a    
  
author   : David Steele <[email protected]>    
date     : Sun, 21 Jul 2024 17:01:23 +0700    
  
committer: David Steele <[email protected]>    
date     : Sun, 21 Jul 2024 17:01:23 +0700    

Click here for diff

The help for help was copied from core but the examples were not updated.  
  
Update the examples to be appropriate for doc/help.  

M doc/src/build/help/help.xml
M test/src/build/help/help.xml

Improve config file handling in doc/test config load.

commit   : 32a6dd6c3d1becdbad9ae14df83daf231a84f860    
  
author   : David Steele <[email protected]>    
date     : Sun, 21 Jul 2024 16:57:35 +0700    
  
committer: David Steele <[email protected]>    
date     : Sun, 21 Jul 2024 16:57:35 +0700    

Click here for diff

Since 1141dc20 it has been possible to request that cfgParse() skip loading the config file. Use this logic to replace the code used to ignore config files in doc/test config load.  

M doc/src/config/load.c
M test/src/config/load.c

Clarify archive-push multi-repo behavior.

commit   : ec3e387bb73826c30b32bf0221acb2d56f23f1c5    
  
author   : David Steele <[email protected]>    
date     : Thu, 18 Jul 2024 11:19:25 +0700    
  
committer: GitHub <[email protected]>    
date     : Thu, 18 Jul 2024 11:19:25 +0700    

Click here for diff

Clarify that archive-push will not be able to push ahead in other repositories if one is failing unless archive-async in enabled.

M doc/xml/release/2024/2.53.xml
M doc/xml/user-guide.xml

Update Minio test/documentation container version.

commit   : c85191e02486d4e9f5ea34ce3bfe7243ddf74831    
  
author   : David Steele <[email protected]>    
date     : Tue, 16 Jul 2024 09:45:22 +0700    
  
committer: David Steele <[email protected]>    
date     : Tue, 16 Jul 2024 09:45:22 +0700    

Click here for diff

M doc/xml/user-guide.xml
M test/src/common/harnessHost.c

Update EOL Debian 10 to Debian 11/Ubuntu 20.04 in CI.

commit   : d8ff89ae758314c8a0f006b7a92097c35534d0ff    
  
author   : David Steele <[email protected]>    
date     : Mon, 15 Jul 2024 11:53:57 +0700    
  
committer: David Steele <[email protected]>    
date     : Mon, 15 Jul 2024 11:53:57 +0700    

Click here for diff

Typically we use the oldest Debian/Ubuntu to run 32-bit unit and integration tests. However, 32-bit is no longer fully supported by Ubuntu (multiple packages we need are missing) and apt.postgresql.org no longer packages for any 32-bit version.  
  
To address these changes, do 64-bit integration testing on the oldest Debian/Ubuntu (currently Ubuntu 20.04) and 32-bit unit/integration testing on the oldest Debian (currently 11) using the included version for integration testing.  

M .github/workflows/test.yml
M test/container.yaml
M test/lib/pgBackRestTest/Common/ContainerTest.pm
M test/lib/pgBackRestTest/Common/VmTest.pm

Remove obsolete vm constants.

commit   : ce2493c3f6718cfa9209665019d56dde36b81b75    
  
author   : David Steele <[email protected]>    
date     : Mon, 15 Jul 2024 11:22:13 +0700    
  
committer: David Steele <[email protected]>    
date     : Mon, 15 Jul 2024 11:22:13 +0700    

Click here for diff

The VM[2-4] constants do not serve a purpose anymore (removed in 794c5771) and just make the mappings more complicated, so remove them.  

M test/lib/pgBackRestTest/Common/VmTest.pm

Remove references to mock integration tests.

commit   : c84ab4914f33dbf0cb762cfb5a552ee39b73eb1e    
  
author   : David Steele <[email protected]>    
date     : Mon, 15 Jul 2024 11:12:53 +0700    
  
committer: David Steele <[email protected]>    
date     : Mon, 15 Jul 2024 11:12:53 +0700    

Click here for diff

Mock integration tests were removed in d41b21c8 but CI was still trying to run them, so remove from CI.  
  
Also rename mock to integration in test unit tests to avoid confusion in the future.  

M .github/workflows/test.yml
M test/src/module/test/coverageTest.c
M test/src/module/test/testTest.c

Support IP-based SANs for TLS certificate validation.

commit   : dfb620b0b8cf884ca486b413f4cd162e258b2fc5    
  
author   : David Christensen <[email protected]>    
date     : Wed, 10 Jul 2024 22:54:20 -0500    
  
committer: GitHub <[email protected]>    
date     : Wed, 10 Jul 2024 22:54:20 -0500    

Click here for diff

The prior SAN code only recognized DNS-based SANs, which meant that it would not properly validate if using an IP-based SAN. 
  

  
Add support for IPv4 and IPv6 SANs with exact matching only.
  

  
This simplifies testing when certificate generation tools have trouble generating a DNS:1.2.3.4-style SAN, preferring to include the SAN as IP:1.2.3.4.

M doc/xml/release/2024/2.53.xml
M src/common/io/tls/client.c
M src/common/io/tls/common.c
M src/common/io/tls/common.h
M test/certificate/pgbackrest-test-server.cnf
M test/certificate/pgbackrest-test-server.crt
M test/src/common/harnessServer.c
M test/src/common/harnessServer.h
M test/src/module/common/ioTlsTest.c

Improve command/role parsing.

commit   : d295156dd38c88c9d71e566509426cf91322e326    
  
author   : David Steele <[email protected]>    
date     : Tue, 9 Jul 2024 16:07:40 +0700    
  
committer: David Steele <[email protected]>    
date     : Tue, 9 Jul 2024 16:07:40 +0700    

Click here for diff

Reduce redundancy by improving cfgParseCommandId() to work when a command role is present. This way the function does not need to be called twice.  
  
Also, remove the use of StringList in cfgParse() since checking for a colon is faster and saves memory allocations. Modify cfgParseCommandRoleEnum() to accept char * since a String is no longer produced for the role name.  

M src/config/parse.c
M test/src/module/config/parseTest.c

Add hint to check SFTP authorization log.

commit   : ccae60940241b30e8bc3e405936b6ba68857930c    
  
author   : Vitalii Zurian <[email protected]>    
date     : Tue, 9 Jul 2024 06:34:13 +0200    
  
committer: GitHub <[email protected]>    
date     : Tue, 9 Jul 2024 06:34:13 +0200    

Click here for diff

In the case of authorization failures there many be valuable information in the log.

M doc/xml/release/2024/2.53.xml
M doc/xml/release/contributor.xml
M src/storage/sftp/storage.c
M test/src/module/storage/sftpTest.c

Require OpenSSL >= 1.1.1.

commit   : cf8625d24bd953ad1ed448c32b937584009e5b6b    
  
author   : David Steele <[email protected]>    
date     : Tue, 9 Jul 2024 11:17:25 +0700    
  
committer: David Steele <[email protected]>    
date     : Tue, 9 Jul 2024 11:17:25 +0700    

Click here for diff

Versions below 1.1.1 are quite old and no longer need to be supported.  
  
Also add a missing const in tlsAsn1ToStr().  

M meson.build
M src/common/crypto/common.c
M src/common/io/tls/common.c
M src/common/io/tls/common.h
M src/storage/gcs/storage.c

Auto-generate code before building test binary.

commit   : b71d4b53d68800daceb4b6dcb717862cbe5757dc    
  
author   : David Steele <[email protected]>    
date     : Tue, 9 Jul 2024 10:48:27 +0700    
  
committer: David Steele <[email protected]>    
date     : Tue, 9 Jul 2024 10:48:27 +0700    

Click here for diff

Errors in code generation can cause the test binary build to fail and then it is not possible to see the generated code.  
  
Instead, generate code first so any errors can be seen and analyzed.  

M test/test.pl

Improve error messages for allow range and allow list options.

commit   : 66d3cd42b5a07edaf75b0f365088dc7e202d0573    
  
author   : David Steele <[email protected]>    
date     : Tue, 9 Jul 2024 10:45:47 +0700    
  
committer: David Steele <[email protected]>    
date     : Tue, 9 Jul 2024 10:45:47 +0700    

Click here for diff

Create mappings between integer, size, time, and stringid option values and their string equivalents. This allows for better error messages and means that the mappings do not need to be stored with defaults, allow lists, etc.  

M doc/src/build/config/config.yaml
M src/build/config/render.c
M src/config/parse.auto.c.inc
M src/config/parse.c
M src/config/parse.h
M test/src/build/config/config.yaml
M test/src/module/build/configTest.c
M test/src/module/config/parseTest.c

Add units to all option sizes.

commit   : aadfb54046e52eeedc38750eb91f3e719e22d758    
  
author   : David Steele <[email protected]>    
date     : Tue, 9 Jul 2024 10:09:55 +0700    
  
committer: David Steele <[email protected]>    
date     : Tue, 9 Jul 2024 10:09:55 +0700    

Click here for diff

Some sizes were missing units. Add units to make it clear that they are sizes in messages.  

M src/build/config/config.yaml

Fix overly long lines.

commit   : 6f5066b0b63c5f89e39a8930d29ab725c381221c    
  
author   : David Steele <[email protected]>    
date     : Sun, 7 Jul 2024 17:06:44 +0700    
  
committer: David Steele <[email protected]>    
date     : Sun, 7 Jul 2024 17:06:44 +0700    

Click here for diff

M src/protocol/helper.c

Fix SFTP renaming failure when file already exists.

commit   : d6f0bf88af8b39492aa8e20c09bdf30260e2eb2f    
  
author   : Reid Thompson <[email protected]>    
date     : Thu, 4 Jul 2024 05:53:07 -0400    
  
committer: GitHub <[email protected]>    
date     : Thu, 4 Jul 2024 05:53:07 -0400    

Click here for diff

Update error handling for libssh2_sftp_rename_ex() in storageWriteSftpClose() when a file already exists. 
  

  
The SFTP servers used during development and testing never returned LIBSSH2_FX_FILE_ALREADY_EXISTS, rather they returned LIBSSH2_FX_FAILURE when a file already existed. However, it is clear that some SFTP servers use LIBSSH2_FX_FILE_ALREADY_EXISTS so add support.

M doc/xml/release/2024/2.53.xml
M doc/xml/release/contributor.xml
M src/storage/sftp/storage.c
M src/storage/sftp/write.c
M test/src/module/storage/sftpTest.c

Allow backups to run concurrently on different repositories.

commit   : edd61636a98d193b7c0634b5a4444527132959e0    
  
author   : David Steele <[email protected]>    
date     : Thu, 4 Jul 2024 16:22:17 +0700    
  
committer: GitHub <[email protected]>    
date     : Thu, 4 Jul 2024 16:22:17 +0700    

Click here for diff

The prior locking only allowed one backup per stanza, which was required by PostgreSQL <= 9.5 and didn't present a problem when only one stanza could be created.
  

  
Now that multiple stanzas are allowed relax this restriction so that backups can run concurrently for PostgreSQL > 9.5. To do this, update the locking to be per stanza and repo rather than per stanza. Remotes are not aware of the repos that require locking so send an explicit list of files to be locked to the remote. Also remove the advisory lock for PostgreSQL > 9.5.
  

  
For info output the running backups are combined for progress output in order to avoid changing the JSON format. It definitely makes sense to have per repo progress as well but that will be left for a future commit.

M doc/src/build/config/config.yaml
M doc/src/build/help/help.xml
M doc/xml/release/2024/2.53.xml
M src/build/config/config.yaml
M src/command/control/stop.c
M src/command/info/info.c
M src/command/lock.c
M src/command/lock.h
M src/common/type/list.c
M src/common/type/list.h
M src/config/config.auto.h
M src/config/parse.auto.c.inc
M src/db/db.c
M src/protocol/helper.c
M test/src/build/config/config.yaml
M test/src/build/help/help.xml
M test/src/common/harnessBackup.c
M test/src/module/command/controlTest.c
M test/src/module/command/infoTest.c
M test/src/module/command/lockTest.c
M test/src/module/command/remoteTest.c
M test/src/module/common/typeListTest.c
M test/src/module/db/dbTest.c
M test/src/module/protocol/protocolTest.c

Display time option defaults and allowed values with appropriate units.

commit   : 3a2266f327c340ff1133a6a2398429c844b5755d    
  
author   : David Steele <[email protected]>    
date     : Thu, 4 Jul 2024 15:42:09 +0700    
  
committer: David Steele <[email protected]>    
date     : Thu, 4 Jul 2024 15:42:09 +0700    

Click here for diff

Similar to size options in 038abaa7, time option defaults and allowed values were displayed in seconds, which could be confusing when the values were large.  
  
The time options were not updated in 038abaa7 because it required removing the ability to do fractional seconds, e.g. 0.5 seconds. In theory this could cause breakage for users but it seems really unlikely. Fractional seconds are used in tests, however, so the tests have been changed to use milliseconds where required, e.g. 500ms.  

M src/build/config/config.yaml
M src/common/type/convert.c
M src/common/type/convert.h
M src/config/common.c
M src/config/parse.auto.c.inc
M test/src/module/command/checkTest.c
M test/src/module/command/helpTest.c
M test/src/module/common/typeConvertTest.c
M test/src/module/config/loadTest.c
M test/src/module/config/parseTest.c

Fix invalid default inherited in job-retry-interval.

commit   : df469471e3afa91212967fc3bca7877a1a8830f3    
  
author   : David Steele <[email protected]>    
date     : Thu, 4 Jul 2024 09:28:57 +0700    
  
committer: David Steele <[email protected]>    
date     : Thu, 4 Jul 2024 09:28:57 +0700    

Click here for diff

This default was being mistakenly inherited from job-retry and would set job-retry-interval to 1 second for archive get and push. In practice this did not matter since archive get and push default to one retry and the first retry interval is always 0, but it still makes sense to fix it to correct the behavior when the value of job-retry is changed.  

M src/build/config/config.yaml
M src/config/parse.auto.c.inc

Shorten enums used in parse.auto.c.inc.

commit   : 8b82641d87de7fd749414737f62289fb2648e608    
  
author   : David Steele <[email protected]>    
date     : Mon, 1 Jul 2024 11:15:14 +0800    
  
committer: David Steele <[email protected]>    
date     : Mon, 1 Jul 2024 11:15:14 +0800    

Click here for diff

Rather than using the full enum just use the part of the enum that is unique. This makes the output a bit more readable by removing the repetitive elements. The prefix for each enum is built into its macro.  

M src/build/config/render.c
M src/config/parse.auto.c.inc
M src/config/parse.c
M test/src/module/build/configTest.c

Remove PARSE_RULE_OPTION_GROUP_MEMBER() macro from parse.auto.c.inc.

commit   : cfd4fb2c7da7b0fc113b6518a054eab29d0ef34f    
  
author   : David Steele <[email protected]>    
date     : Sun, 30 Jun 2024 16:11:11 +0800    
  
committer: David Steele <[email protected]>    
date     : Sun, 30 Jun 2024 16:11:11 +0800    

Click here for diff

It is simpler to just set group = true in the PARSE_RULE_OPTION_GROUP_ID(), so do that.  

M src/build/config/render.c
M src/config/parse.auto.c.inc
M src/config/parse.c
M test/src/module/build/configTest.c

Default log-level-stderr option to off.

commit   : 7d540730941994d3cb630c695e9f672e047d8e7f    
  
author   : David Steele <[email protected]>    
date     : Tue, 25 Jun 2024 16:45:47 +0800    
  
committer: GitHub <[email protected]>    
date     : Tue, 25 Jun 2024 16:45:47 +0800    

Click here for diff

Writing warnings and errors to stderr by default leads to error messages being lost when the user does not correctly redirect stderr while generating logs for analysis. This happens so often that it seems worth changing the default to increase the quality of the logs we receive.
  

  
If the user has explicitly set log-level-stderr then there is no change in behavior.

M doc/xml/release/2024/2.53.xml
M doc/xml/user-guide.xml
M src/build/config/config.yaml
M src/config/parse.auto.c.inc
M src/config/parse.c
M test/src/common/harnessHost.c
M test/src/module/command/helpTest.c
M test/src/module/config/parseTest.c

Require compiler support for __builtin_clzl() and __builtin_bswap64().

commit   : 1094aecab563e8c1601ae80caefb2e4247db87d4    
  
author   : David Steele <[email protected]>    
date     : Tue, 25 Jun 2024 16:16:55 +0800    
  
committer: David Steele <[email protected]>    
date     : Tue, 25 Jun 2024 16:16:55 +0800    

Click here for diff

These functions will be useful for optimizing varint-128 functions.  
  
Require them in the meson build before adding new code in case there are problems with packaging.  

M doc/xml/release/2024/2.53.xml
M meson.build

Require the lz4 library in the meson build.

commit   : 0c32757fd9269a18b827fa33230d2997c98571a0    
  
author   : David Steele <[email protected]>    
date     : Tue, 25 Jun 2024 16:04:02 +0800    
  
committer: David Steele <[email protected]>    
date     : Tue, 25 Jun 2024 16:04:02 +0800    

Click here for diff

We would like to use lz4 for protocol compression instead of gz but first we need to make sure this is not going to cause a problem for packaging.  
  
To do this make lz4 required in meson but make no changes to the code so this is an easy revert for packagers if there is an issue.  

M doc/xml/release/2024/2.53.xml
M meson.build
M meson_options.txt

Increase width of unsigned integration in performance/type module.

commit   : acb9b6ccbeb78391e19b146488093c83d0ac3ab3    
  
author   : David Steele <[email protected]>    
date     : Tue, 25 Jun 2024 15:54:57 +0800    
  
committer: David Steele <[email protected]>    
date     : Tue, 25 Jun 2024 15:54:57 +0800    

Click here for diff

The prior int was too small to scale up as much as we need for performance testing.  

M test/src/module/performance/typeTest.c

Fix --run and --scale options for unit tests.

commit   : 6495a46ca3e08f867efd677aecd29806e9e9f753    
  
author   : David Steele <[email protected]>    
date     : Tue, 25 Jun 2024 15:46:07 +0800    
  
committer: David Steele <[email protected]>    
date     : Tue, 25 Jun 2024 15:46:07 +0800    

Click here for diff

These were broken while code was being migrated to C and went unnoticed because the options are generally only used when doing performance testing.  
  
The C code can only take one --run param so add a check for that in test.pl.  

M test/lib/pgBackRestTest/Common/JobTest.pm
M test/test.pl

Add remote locks for stanza commands missed in 31c7824a.

commit   : cfb8aa202ee972579697db2cc8d5d8ef111f0022    
  
author   : David Steele <[email protected]>    
date     : Fri, 21 Jun 2024 13:29:17 +0800    
  
committer: David Steele <[email protected]>    
date     : Fri, 21 Jun 2024 13:29:17 +0800    

Click here for diff

31c7824a should have added remote locks when the commands were modified to run remotely. This is unlikely to have caused issues since these commands are generally not run concurrently with backup/expire but having the locks is safer.  

M doc/xml/release/2024/2.53.xml
M src/build/config/config.yaml
M src/config/parse.auto.c.inc

Clarify when code generation is run when modifying config.yaml.

commit   : b9a9ef2d5fa22c4e257f4d1befbc067029570211    
  
author   : David Steele <[email protected]>    
date     : Fri, 21 Jun 2024 11:17:42 +0800    
  
committer: David Steele <[email protected]>    
date     : Fri, 21 Jun 2024 11:17:42 +0800    

Click here for diff

The contributing guide indicated that this happened at compile time but in fact it happens when test.pl is run.  

M CONTRIBUTING.md
M doc/xml/contributing.xml

Optimize assignment of command/option rules.

commit   : bcda7f8c7ee9823880bd1a9b5e65075df1102652    
  
author   : David Steele <[email protected]>    
date     : Thu, 20 Jun 2024 13:06:04 +0800    
  
committer: David Steele <[email protected]>    
date     : Thu, 20 Jun 2024 13:06:04 +0800    

Click here for diff

Assign the rule to a local variable to make subsequent assignments more efficient.  
  
Also fix a missing const.  

M src/config/parse.c

Replace strftime() with cvtTimeToZP() and strNew/CatTimeP().

commit   : a0a5f2300cf771095a0a7fc309d40c1f27c899a6    
  
author   : David Steele <[email protected]>    
date     : Wed, 19 Jun 2024 10:33:46 +0800    
  
committer: David Steele <[email protected]>    
date     : Wed, 19 Jun 2024 10:33:46 +0800    

Click here for diff

These functions produce cleaner code and hide implementation details.  

M meson.build
M src/build.auto.h.in
M src/command/backup/common.c
M src/command/manifest/manifest.c
M src/command/restore/restore.c
M src/common/debug.h
M src/common/log.c
M src/common/type/convert.c
M src/common/type/convert.h
M src/common/type/string.c
M src/common/type/string.h
M src/storage/s3/storage.c
M test/src/module/command/restoreTest.c
M test/src/module/common/typeConvertTest.c
M test/src/module/common/typeStringTest.c
M test/src/module/storage/s3Test.c

Refactor backup to use flag for backup standby state rather than option.

commit   : cec486b6dd02b6a755142ad4bee322fb02ff0d23    
  
author   : David Steele <[email protected]>    
date     : Tue, 18 Jun 2024 11:42:59 +0800    
  
committer: David Steele <[email protected]>    
date     : Tue, 18 Jun 2024 11:42:59 +0800    

Click here for diff

Using the option adds a bit of complexity -- it is simpler just to use the state of the standby object to determine if backup from standby is enabled.  

M src/command/backup/backup.c
M test/src/module/command/backupTest.c

Refactor lock module.

commit   : 270dce41b6fff0d0ad0769b0ea5df0011140f0b9    
  
author   : David Steele <[email protected]>    
date     : Tue, 18 Jun 2024 10:43:54 +0800    
  
committer: GitHub <[email protected]>    
date     : Tue, 18 Jun 2024 10:43:54 +0800    

Click here for diff

Refactor the lock module to split command-specific logic from the basic file locking functionality. Command specific logic is now in command/lock.c. This will make it easier to implement new features such as repository locking and updating lock file contents on remotes.
  

  
This implementation is essentially a drop-in replacement but there are a few differences. First, the lock names no longer require a path (the path is added in the lock module). Second, the timeout functionality has been removed since it was not being used.

M CONTRIBUTING.md
M doc/src/meson.build
M doc/xml/contributing.xml
M doc/xml/release/2024/2.53.xml
M src/Makefile.in
M src/command/archive/get/get.c
M src/command/archive/push/push.c
M src/command/backup/backup.c
M src/command/control/stop.c
M src/command/exit.c
M src/command/info/info.c
A src/command/lock.c
A src/command/lock.h
M src/command/remote/remote.c
M src/common/lock.c
M src/common/lock.h
M src/config/config.h
M src/config/load.c
M src/main.c
M src/meson.build
M test/define.yaml
M test/src/common/harnessBackup.c
M test/src/common/harnessConfig.c
M test/src/common/harnessLock.c
M test/src/meson.build
M test/src/module/command/archiveGetTest.c
M test/src/module/command/archivePushTest.c
M test/src/module/command/backupTest.c
M test/src/module/command/controlTest.c
M test/src/module/command/infoTest.c
A test/src/module/command/lockTest.c
M test/src/module/common/lockTest.c
M test/src/module/config/loadTest.c

Fix issue with files larger on the replica than on the primary.

commit   : ad7377c75b2769d2907482de139fb21f779ae674    
  
author   : David Steele <[email protected]>    
date     : Sun, 16 Jun 2024 11:55:04 +0800    
  
committer: GitHub <[email protected]>    
date     : Sun, 16 Jun 2024 11:55:04 +0800    

Click here for diff

If a file on the primary was larger than on the replica then the next diff/incr backup would store the primary size instead of the replica size when block incremental was enabled. On the next diff/incr backup this would lead to a repo size must be > 0 for file error when validating the manifest.
  

  
Fix this by limiting copy based on sizeOriginal rather than size so size can be set to the value expected to be stored in the manifest. As a bonus sizePrior is no longer needed since size can be used for the same purpose.

M doc/xml/release/2024/2.53.xml
M doc/xml/release/contributor.xml
M src/command/backup/backup.c
M src/command/backup/file.c
M src/command/backup/file.h
M src/command/backup/protocol.c
M src/info/manifest.c
M src/info/manifest.h
M test/src/module/command/backupTest.c
M test/src/module/info/manifestTest.c

Specify test images that get valgrind installed.

commit   : 2ec99ca4d9e40dcae628c2a435c8242bdcefabc2    
  
author   : David Steele <[email protected]>    
date     : Wed, 12 Jun 2024 16:08:17 +1000    
  
committer: David Steele <[email protected]>    
date     : Wed, 12 Jun 2024 16:08:17 +1000    

Click here for diff

This means valgrind is no longer built from source, which caused image builds to run for a very long time.  
  
Valgrind is only required in a few images for testing.  

M .github/workflows/test.yml
M test/container.yaml
M test/lib/pgBackRestTest/Common/ContainerTest.pm

Migrate CentOS 7 integration tests to Rocky 8.

commit   : 886bb281f69bb22228eb41760ef8ad60cdd820db    
  
author   : David Steele <[email protected]>    
date     : Tue, 11 Jun 2024 15:20:04 +1000    
  
committer: David Steele <[email protected]>    
date     : Tue, 11 Jun 2024 15:20:04 +1000    

Click here for diff

CentOS 7 will be EOL on June 30 and since there is no CentOS 8 migrate instead to Rocky 8.  

M .github/workflows/test.yml
M test/ci.pl
M test/container.yaml
M test/lib/pgBackRestTest/Common/ContainerTest.pm
M test/lib/pgBackRestTest/Common/VmTest.pm
M test/src/build/help/help.xml
M test/test.pl

Allow alternative WAL segment sizes for PostgreSQL <= 10.

commit   : 4ac3b82c99ff3bd48d2cc74651a47ce072ac0022    
  
author   : Viktor Kurilko <[email protected]>    
date     : Tue, 11 Jun 2024 12:08:52 +1000    
  
committer: David Steele <[email protected]>    
date     : Tue, 11 Jun 2024 12:08:52 +1000    

Click here for diff

Alternative WAL segment sizes can be configured in PostgreSQL <= 10 with compile-time options. We have not allowed these before since it was not a well-tested feature of PostgreSQL.  
  
However, forks such as Greenplum allow alternative WAL segment sizes at initdb time (which are presumably well-tested) so it makes sense to allow it.  
  
Since the PostgreSQL versions in question are all EOL it is not important to have this restriction in place anymore.  

M doc/xml/release/2024/2.53.xml
M src/command/archive/common.c
M src/postgres/interface.c
M src/postgres/interface.h
M test/src/common/harnessPostgres.c
M test/src/common/harnessPostgres.h
M test/src/module/command/verifyTest.c
M test/src/module/postgres/interfaceTest.c

Add unit tests for backup from standby with block incremental.

commit   : e8b965756c380953d4312c26c81489cc9787d1cf    
  
author   : David Steele <[email protected]>    
date     : Sun, 9 Jun 2024 11:39:58 +1000    
  
committer: David Steele <[email protected]>    
date     : Sun, 9 Jun 2024 11:39:58 +1000    

Click here for diff

These tests are important for an upcoming bug fix related to differing sizes of a file on a primary vs standby.  
  
The test that demonstrates the bug cannot be included here since it causes a test failure, but this commit introduces the infrastructure and one test to guard against a regression in the bug fix.  

M test/src/module/command/backupTest.c

Improve efficiency of incremental manifest build.

commit   : cf478bc75352486b5aed555404f912c6fdea92a0    
  
author   : David Steele <[email protected]>    
date     : Sat, 8 Jun 2024 13:00:53 +1000    
  
committer: David Steele <[email protected]>    
date     : Sat, 8 Jun 2024 13:00:53 +1000    

Click here for diff

Move the file.copy check before the manifest lookup to save a lookup and (probably) find for zero-length files when bundling.  
  
This also removes a layer of indentation which helps with readability.  

M src/info/manifest.c

Simplify lock file scanning in stop command.

commit   : 48823b6cd320373b1b8de52d6ff931094fbe43f7    
  
author   : David Steele <[email protected]>    
date     : Fri, 7 Jun 2024 14:24:08 +1000    
  
committer: David Steele <[email protected]>    
date     : Fri, 7 Jun 2024 14:24:08 +1000    

Click here for diff

This simpler implementation only requires that a lock file begin with the stanza (followed by a dash) and end in .lock.  
  
This will make the implementation more resilient to planned changes in lock file naming.  

M src/command/control/stop.c

Avoid possible race condition while reading lock files in info command.

commit   : ea1596152ceba8ad8f8e94d55c992e0982e5c879    
  
author   : David Steele <[email protected]>    
date     : Fri, 7 Jun 2024 14:09:17 +1000    
  
committer: David Steele <[email protected]>    
date     : Fri, 7 Jun 2024 14:09:17 +1000    

Click here for diff

Since lockRead() was being called twice the state of the lock file could change between leading to invalid data in the info output.  
  
Instead call lockRead() once and use the result for both the validity test and output.  

M src/command/info/info.c

Replace tabs with spaces in meson.build files.

commit   : 01838995ce08f93789d5003598cf5b43ed405465    
  
author   : David Steele <[email protected]>    
date     : Fri, 7 Jun 2024 09:21:13 +1000    
  
committer: David Steele <[email protected]>    
date     : Fri, 7 Jun 2024 09:21:13 +1000    

Click here for diff

These were probably copied over from Makefile.in.  

M src/meson.build
M test/src/meson.build

Migrate coverage testing to C and remove dependency on lcov.

commit   : 6f562fba60cd035508726b037f72fdcc75e94e88    
  
author   : David Steele <[email protected]>    
date     : Fri, 31 May 2024 14:52:07 +1000    
  
committer: David Steele <[email protected]>    
date     : Fri, 31 May 2024 14:52:07 +1000    

Click here for diff

lcov does not seem to be very well maintained and is often not compatible with the version of gcc it ships with until a few months after a new distro is released. In any case, lcov is that not useful for us because it generates reports on all coverage while we are mainly interested in missing coverage during development.  
  
Instead use the JSON output generated by gcov to generate our minimal coverage report and metrics for the documentation.  
  
There are some slight differences in the metrics. The difference in the common module was due to a bug in the old code -- build/common was being added into common as well as being reported separately. The source of the two additional branches in the backup module is unknown but almost certainly down to how exclusions are processed with regular expressions. Since there is additional coverage rather than coverage missing this seems fine.  
  
Since this was pretty much a rewrite it was also a good time to migrate to C.  

M CONTRIBUTING.md
M doc/src/meson.build
M doc/xml/auto/metric-coverage-report.auto.xml
M doc/xml/contributing.xml
A src/build/common/json.c
A src/build/common/json.h
M test/Dockerfile
M test/Vagrantfile
M test/ci.pl
M test/code-count/file-type.yaml
M test/container.yaml
M test/define.yaml
M test/lib/pgBackRestTest/Common/CodeCountTest.pm
M test/lib/pgBackRestTest/Common/ContainerTest.pm
D test/lib/pgBackRestTest/Common/CoverageTest.pm
M test/lib/pgBackRestTest/Common/JobTest.pm
M test/lib/pgBackRestTest/Common/VmTest.pm
M test/src/build/config/config.yaml
M test/src/build/help/help.xml
A test/src/command/test/coverage.c
A test/src/command/test/coverage.h
M test/src/main.c
M test/src/meson.build
M test/src/module/common/typeJsonTest.c
A test/src/module/test/coverageTest.c
M test/test.pl

Begin v2.53 development.

commit   : 49e252f49260c6d8f3925dc7dace0785322ec288    
  
author   : David Steele <[email protected]>    
date     : Mon, 27 May 2024 11:49:21 +1000    
  
committer: David Steele <[email protected]>    
date     : Mon, 27 May 2024 11:49:21 +1000    

Click here for diff

M doc/resource/git-history.cache
M doc/xml/release.xml
M doc/xml/release/2024/2.52.xml
A doc/xml/release/2024/2.53.xml
M meson.build
M src/build/configure.ac
M src/configure
M src/version.h
M test/code-count/file-type.yaml