pgBackRest 2.42 (upcoming) commit log

Update Minio test/documentation container version.

commit   : 02665a5894dc4b025172b32c7a1ce42c81d6c582    
  
author   : David Steele <david@pgmasters.net>    
date     : Tue, 2 Aug 2022 11:05:31 -0400    
  
committer: David Steele <david@pgmasters.net>    
date     : Tue, 2 Aug 2022 11:05:31 -0400    

Click here for diff

M doc/xml/user-guide.xml
M test/lib/pgBackRestTest/Env/Host/HostS3Test.pm

Add profiling, performance, and optimization to C test harness.

commit   : eb287b18c882a16eecfb1445a513c4da4ccab1b7    
  
author   : David Steele <david@pgmasters.net>    
date     : Fri, 29 Jul 2022 10:31:36 -0400    
  
committer: David Steele <david@pgmasters.net>    
date     : Fri, 29 Jul 2022 10:31:36 -0400    

Click here for diff

All unit and performance tests are now built by the C harness.  
  
Remove all unit/performance test build code from Perl.  
  
Remove code from C harness that is no longer used. This code was included so the C harness could be run separately, but that is no longer needed with this full integration.  

M .github/workflows/test.yml
M test/lib/pgBackRestTest/Common/DefineTest.pm
M test/lib/pgBackRestTest/Common/JobTest.pm
M test/lib/pgBackRestTest/Common/ListTest.pm
M test/src/build/config/config.yaml
M test/src/build/help/help.xml
M test/src/command/test/build.c
M test/src/command/test/build.h
M test/src/command/test/define.c
M test/src/command/test/define.h
M test/src/command/test/test.c
M test/src/command/test/test.h
M test/src/main.c
M test/src/test.c

Add coverage to C test harness.

commit   : 1e83f2a022b36191c2d12185ed57cf4d96462862    
  
author   : David Steele <david@pgmasters.net>    
date     : Thu, 28 Jul 2022 14:53:48 -0400    
  
committer: David Steele <david@pgmasters.net>    
date     : Thu, 28 Jul 2022 14:53:48 -0400    

Click here for diff

Coverage reports are still generated in Perl, but all the settings have been added to the C harness to generate raw coverage data.  

M test/lib/pgBackRestTest/Common/JobTest.pm
M test/src/build/config/config.yaml
M test/src/build/help/help.xml
M test/src/command/test/build.c
M test/src/command/test/build.h
M test/src/command/test/test.c
M test/src/command/test/test.h
M test/src/main.c

Integrate C test harness with Perl test harness.

commit   : c99ea54f17c1f26a5e996bb8cfd3df81684f813b    
  
author   : David Steele <david@pgmasters.net>    
date     : Wed, 27 Jul 2022 10:32:32 -0400    
  
committer: David Steele <david@pgmasters.net>    
date     : Wed, 27 Jul 2022 10:32:32 -0400    

Click here for diff

The C test harness is used for unit tests from the Perl harness where possible. Currently, unit tests can be run in the C harness when --no-coverage is specified and --profile is not specified.  
  
C harness tests work on meson 0.45.  
  
The C harness runs with valgrind by default. Valgrind can be disabled with --no-valgrind.  
  
Also rebuild containers to add meson and update the documentation so that meson builds will work (even though we don't do them yet).  

M .github/workflows/test.yml
M doc/xml/user-guide.xml
M test/container.yaml
M test/lib/pgBackRestTest/Common/ContainerTest.pm
M test/lib/pgBackRestTest/Common/JobTest.pm
M test/src/build/config/config.yaml
M test/src/build/help/help.xml
M test/src/command/test/build.c
M test/src/command/test/test.c
M test/src/command/test/test.h
M test/src/main.c
M test/test.pl

Add reviewer for c267ba51.

commit   : 2caef37fd55ea12959015f02a106774f6ad711b7    
  
author   : David Steele <david@pgmasters.net>    
date     : Tue, 26 Jul 2022 18:25:24 -0400    
  
committer: David Steele <david@pgmasters.net>    
date     : Tue, 26 Jul 2022 18:25:24 -0400    

Click here for diff

M doc/xml/release.xml

Add absolute path for kill in pgbackrest.service.

commit   : e9ff5248039eedb25da2fee550ec64fcebbc51c7    
  
author   : David Steele <david@pgmasters.net>    
date     : Tue, 26 Jul 2022 15:15:12 -0400    
  
committer: David Steele <david@pgmasters.net>    
date     : Tue, 26 Jul 2022 15:15:12 -0400    

Click here for diff

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

Move release build check to src/meson.build.

commit   : 79d9884141f90a9e93fb2ec8faef15e460dd3442    
  
author   : David Steele <david@pgmasters.net>    
date     : Mon, 25 Jul 2022 09:39:54 -0400    
  
committer: David Steele <david@pgmasters.net>    
date     : Mon, 25 Jul 2022 09:39:54 -0400    

Click here for diff

This allows the C harness to perform release builds which are required for some tests.  

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

Move standby timeline check after checkpoint.

commit   : c267ba51b1778b5872f4ee928a9614545d743f3f    
  
author   : David Steele <david@pgmasters.net>    
date     : Fri, 22 Jul 2022 16:24:55 -0400    
  
committer: GitHub <noreply@github.com>    
date     : Fri, 22 Jul 2022 16:24:55 -0400    

Click here for diff

The standby timeline check was being performed using pg_control data loaded before the backup started. If the backup was started immediately after a promotion the standby might not have executed a checkpoint and written the new timeline to pg_control.
  

  
Instead perform the timeline check after the checkpoint is executed. This should ensure that the new timeline is in pg_control.

M doc/xml/release.xml
M src/db/db.c
M test/src/module/db/dbTest.c

Improve warning message on backup resume.

commit   : cbbe93f592d8097393c5ffe214f0a8c5fb0549c1    
  
author   : David Steele <david@pgmasters.net>    
date     : Fri, 22 Jul 2022 14:45:38 -0400    
  
committer: David Steele <david@pgmasters.net>    
date     : Fri, 22 Jul 2022 14:45:38 -0400    

Click here for diff

The prior warning made it sound as if some action was required on the part of the user.  
  
The new message should make it clearer that this action will be performed by pgBackRest.  

M doc/xml/release.xml
M src/command/backup/backup.c
M test/src/module/command/backupTest.c

Remove Debian package patch now that it has been merged upstream.

commit   : 4c47cc5d4786b88a06c38aefe628356342433f64    
  
author   : David Steele <david@pgmasters.net>    
date     : Fri, 22 Jul 2022 09:24:29 -0400    
  
committer: David Steele <david@pgmasters.net>    
date     : Fri, 22 Jul 2022 09:24:29 -0400    

Click here for diff

D test/patch/debian-package.patch

More C test harness improvements and CI.

commit   : 19d9941367f68d6effb516fbb1444877fea9a9ce    
  
author   : David Steele <david@pgmasters.net>    
date     : Thu, 21 Jul 2022 20:10:51 -0400    
  
committer: David Steele <david@pgmasters.net>    
date     : Thu, 21 Jul 2022 20:10:51 -0400    

Click here for diff

Build pgbackrest binary and auto-generated code automatically.  
  
Remove --module option and allow modules to run by parameter. This is less verbose and multiple modules can be run at a time.  
  
Allow filtering of modules. Multiple tests can be passed as parameters and if the module ends in / it will be used as a prefix filter. For example, common/ will run all the common modules.  
  
If a test errors the remaining tests will still run but the test process will eventually exit with an error.  
  
CI tests are included but unit tests remain on the development branch.  
  
With these changes all unit tests run except those that specify the define (e.g. common/assert-off) or containerReq (e.g. protocol/protocol) keywords.  
  
Building the C test harness has been simplified:  
  
meson -Dwerror=true -Dfatal-errors=true -Dbuildtype=debug test/build/none pgbackrest  
ninja -C test/build/none test/src/test-pgbackrest  
  
To run all modules:  
  
test/build/none/test/src/test-pgbackrest test  
  
Just the common/error module:  
  
test/build/none/test/src/test-pgbackrest test common/error  
  
All info modules:  
  
test/build/none/test/src/test-pgbackrest test info/  

M .github/workflows/test.yml
M test/src/build/config/config.yaml
M test/src/build/help/help.xml
M test/src/command/help/meson.build
M test/src/command/test/build.c
M test/src/command/test/build.h
M test/src/command/test/test.c
M test/src/command/test/test.h
M test/src/main.c

Test Dockerfile improvements.

commit   : edfcf1652c6ab07fe5a147b97df0c563e09d3445    
  
author   : David Steele <david@pgmasters.net>    
date     : Thu, 21 Jul 2022 19:27:58 -0400    
  
committer: David Steele <david@pgmasters.net>    
date     : Thu, 21 Jul 2022 19:27:58 -0400    

Click here for diff

Add tzdata package so timezone tests in command/restore work correctly.  
  
Mark default git path as safe. This is a security fix that is not applicable in this environment, but must be set.  
  
Also remove package cleanup, which is inconvenient when new packages need to be installed. It makes sense for containers that will be downloaded from Dockerhub but not so much for a locally-maintained container.  

M test/Dockerfile

Fix common/lock test creating "750" path.

commit   : 5e5b04be3741b4e903c9a7764dadfbe5bda121ae    
  
author   : David Steele <david@pgmasters.net>    
date     : Thu, 21 Jul 2022 18:19:47 -0400    
  
committer: David Steele <david@pgmasters.net>    
date     : Thu, 21 Jul 2022 18:19:47 -0400    

Click here for diff

This was clearly an attempt to set the mode when creating a directory, but it never worked and instead created a "750" directory in the current working directory.  
  
Detected when running in an environment where the current working directory was read-only.  

M test/src/module/common/lockTest.c

C test harness improvements.

commit   : f9bbafbf3fbd67fc289cf849900799b4718dace1    
  
author   : David Steele <david@pgmasters.net>    
date     : Wed, 20 Jul 2022 19:02:14 -0400    
  
committer: David Steele <david@pgmasters.net>    
date     : Wed, 20 Jul 2022 19:02:14 -0400    

Click here for diff

Add harness depends when present.  
  
Include libyaml in all test builds.  
  
Fix mode on paths before trying to remove and set test path with mode 770 to match the Perl test harness.  
  
With these changes all unit tests run except those that specify the define (e.g. common/assert-off), binReq (e.g. command/archive-get), or containerReq (e.g. protocol/protocol) keywords.  
  
Builds and code generation need to be done in advance. The following commands are required for setup:  
  
meson setup -Dwerror=true -Dfatal-errors=true -Dbuildtype=debug build pgbackrest  
ninja -C build test/src/test-pgbackrest  
build/src/build-code help pgbackrest  
build/src/build-code postgres pgbackrest  
  
Now tests can be run, e.g.:  
  
build/test/src/test-pgbackrest --module=postgres/interface  

M test/src/command/test/build.c
M test/src/command/test/test.c

Unify code builder binaries into a single binary.

commit   : c625f05a13e0238bf06feb26d0d8757dd2bedffd    
  
author   : David Steele <david@pgmasters.net>    
date     : Wed, 20 Jul 2022 17:45:39 -0400    
  
committer: David Steele <david@pgmasters.net>    
date     : Wed, 20 Jul 2022 17:45:39 -0400    

Click here for diff

Creating new binaries was convenient at first but has now become a maintenance issue.  
  
Solve this by combining that into a single binary that takes an additional parameter to indicate which code should be built.  
  
Also clean up path handling to make it easier to build code from the command line.  

M src/.gitignore
M src/Makefile.in
M src/build/common/render.h
D src/build/config/main.c
D src/build/error/main.c
M src/build/help/render.c
R056 src/build/help/main.c src/build/main.c
D src/build/postgres/main.c
M src/build/postgres/render.c
M src/command/help/meson.build
M src/common/error.auto.c.inc
M src/common/error.auto.h
M src/config/config.auto.h
M src/config/parse.auto.c.inc
M src/meson.build
M src/postgres/meson.build
M test/src/command/help/meson.build
M test/src/config/meson.build
M test/src/module/build/configTest.c
M test/src/module/build/errorTest.c
M test/src/module/build/helpTest.c
M test/src/module/build/postgresTest.c
M test/test.pl

Add module harness and shim support to the C test harness.

commit   : 7eb5d679857999faebe78730c5a30e450ef80d5c    
  
author   : David Steele <david@pgmasters.net>    
date     : Tue, 19 Jul 2022 18:03:39 -0400    
  
committer: David Steele <david@pgmasters.net>    
date     : Tue, 19 Jul 2022 18:03:39 -0400    

Click here for diff

This allows running unit tests up to common/ini, excluding common/debug-off and common/assert-off.  

M test/src/command/test/build.c
M test/src/command/test/define.c
M test/src/command/test/define.h

commit   : 8fdeed780787a2c6df6672f5d9c75fb7b5b613bc    
  
author   : David Steele <david@pgmasters.net>    
date     : Tue, 19 Jul 2022 17:57:13 -0400    
  
committer: David Steele <david@pgmasters.net>    
date     : Tue, 19 Jul 2022 17:57:13 -0400    

Click here for diff

This makes the test code a bit simpler where we are listing a path but not following links.  
  
Links in the repository can be used for testing but should never be committed to the main branch.  

M test/test.pl

Fix comment typo.

commit   : eb775790087cd8594f6649893895c42a407302cd    
  
author   : David Steele <david@pgmasters.net>    
date     : Tue, 19 Jul 2022 17:25:07 -0400    
  
committer: David Steele <david@pgmasters.net>    
date     : Tue, 19 Jul 2022 17:25:07 -0400    

Click here for diff

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

Update config.guess to latest version.

commit   : f3a10b921bf3d87152d27347df23b487877abe94    
  
author   : David Steele <david@pgmasters.net>    
date     : Mon, 18 Jul 2022 10:52:57 -0400    
  
committer: David Steele <david@pgmasters.net>    
date     : Mon, 18 Jul 2022 10:52:57 -0400    

Click here for diff

M src/build/config.guess

Begin v2.41 development.

commit   : 20f9f726478a4d1c8897cc31a5bf7df52275b84f    
  
author   : David Steele <david@pgmasters.net>    
date     : Mon, 18 Jul 2022 10:49:58 -0400    
  
committer: David Steele <david@pgmasters.net>    
date     : Mon, 18 Jul 2022 10:49:58 -0400    

Click here for diff

M doc/resource/git-history.cache
M doc/xml/release.xml
M meson.build
M src/build/configure.ac
M src/configure
M src/version.h