pgBackRest 2.23 commit log

v2.22: Bug Fix

commit   : bae6e1c9e3a035f3793739ef1b469015777aa70b    
  
author   : David Steele <[email protected]>    
date     : Tue, 21 Jan 2020 16:12:33 -0700    
  
committer: David Steele <[email protected]>    
date     : Tue, 21 Jan 2020 16:12:33 -0700    

Click here for diff

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 10 instead of 16, which led to errors when the timeline was ≥ 0xA. (Reported by Lukas Ertl, Eric Veldhuyzen.)  

M README.md
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
M lib/pgBackRest/Version.pm
M src/configure
M src/configure.ac
M src/version.h

Fix comment.

commit   : 94842ccecee642cc58f6c177c19e642d86a8d997    
  
author   : David Steele <[email protected]>    
date     : Tue, 21 Jan 2020 11:59:25 -0700    
  
committer: David Steele <[email protected]>    
date     : Tue, 21 Jan 2020 11:59:25 -0700    

Click here for diff

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

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

commit   : 03d434c7e112eb3a8649e9c11149e08929f9651b    
  
author   : David Steele <[email protected]>    
date     : Tue, 21 Jan 2020 11:57:59 -0700    
  
committer: David Steele <[email protected]>    
date     : Tue, 21 Jan 2020 11:57:59 -0700    

Click here for diff

Also revert 731ffcfb and update ContainerTest.pm for upstream changes.  

M .travis.yml
M test/lib/pgBackRestTest/Common/ContainerTest.pm
D test/patch/rhel-package.patch

Fix error in timeline conversion.

commit   : b89e6b7f69677fdaff3bb1ed5e908c843f72a4b5    
  
author   : David Steele <[email protected]>    
date     : Tue, 21 Jan 2020 10:29:46 -0700    
  
committer: David Steele <[email protected]>    
date     : Tue, 21 Jan 2020 10:29:46 -0700    

Click here for diff

The timeline is required to verify WAL segments in the archive after a backup. The conversion was performed base 10 instead of 16, which led to errors when the timeline was ≥ 0xA.  

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

Fix invalid bufSize().

commit   : c2da9aa907802a59a0c6fd5c111a1dbe7ea16c76    
  
author   : David Steele <[email protected]>    
date     : Sun, 19 Jan 2020 14:54:38 -0700    
  
committer: David Steele <[email protected]>    
date     : Sun, 19 Jan 2020 14:54:38 -0700    

Click here for diff

bufUsed() should be used here to avoid a possible segfault or xml parse error when bufSize() > bufUsed().  

M src/common/type/xml.c

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

commit   : c630bda1c184d475155220884f8a25fa4b788aaf    
  
author   : David Steele <[email protected]>    
date     : Sun, 19 Jan 2020 10:37:08 -0700    
  
committer: David Steele <[email protected]>    
date     : Sun, 19 Jan 2020 10:37:08 -0700    

Click here for diff

D test/patch/debian-package.patch

Add UTF8 strings to manifest and restore tests.

commit   : d9efbc3698f92b874abb6eff3298c44fd35b0d5c    
  
author   : David Steele <[email protected]>    
date     : Sat, 18 Jan 2020 10:46:48 -0700    
  
committer: David Steele <[email protected]>    
date     : Sat, 18 Jan 2020 10:46:48 -0700    

Click here for diff

The most likely place to get UTF8 characters is in database names so make sure UTF8 works in the places where database names are processed.  

M test/src/module/command/restoreTest.c
M test/src/module/info/manifestTest.c

Fix redundancy in comment.

commit   : 19c39fe1e262dd7c259e9f1e68d0695c43afefe3    
  
author   : David Steele <[email protected]>    
date     : Fri, 17 Jan 2020 22:54:19 -0700    
  
committer: David Steele <[email protected]>    
date     : Fri, 17 Jan 2020 22:54:19 -0700    

Click here for diff

M src/common/fork.c

Add MEM_CONTEXT_PRIOR() block and update current call sites.

commit   : ec173f12fb9c26553b2021473dd62d73a006835a    
  
author   : David Steele <[email protected]>    
date     : Fri, 17 Jan 2020 13:29:49 -0700    
  
committer: David Steele <[email protected]>    
date     : Fri, 17 Jan 2020 13:29:49 -0700    

Click here for diff

This macro block encapsulates the common pattern of switching to the prior (formerly called old) mem context to return results from a function.  
  
Also rename MEM_CONTEXT_OLD() to memContextPrior().  This violates our convention of macros being in all caps but memContextPrior() will become a function very soon so this will reduce churn.  

M libc/LibC.h
M libc/xs/config/configTest.xsh
M libc/xs/postgres/client.xs
M libc/xs/storage/storage.xs
M libc/xs/storage/storageRead.xs
M libc/xs/storage/storageWrite.xs
M src/command/archive/common.c
M src/command/archive/get/file.c
M src/command/archive/push/file.c
M src/command/archive/push/push.c
M src/command/backup/backup.c
M src/command/backup/file.c
M src/command/info/info.c
M src/command/restore/restore.c
M src/common/crypto/hash.c
M src/common/ini.c
M src/common/io/http/client.c
M src/common/io/io.c
M src/common/memContext.h
M src/common/type/json.c
M src/common/type/string.c
M src/common/type/string.h
M src/common/type/stringList.c
M src/common/type/variant.h
M src/config/config.c
M src/config/exec.c
M src/config/protocol.c
M src/db/db.c
M src/db/helper.c
M src/db/protocol.c
M src/info/manifest.c
M src/postgres/client.c
M src/postgres/interface.c
M src/protocol/client.c
M src/protocol/command.c
M src/protocol/helper.c
M src/storage/posix/storage.c
M src/storage/remote/storage.c
M src/storage/s3/storage.c
M src/storage/storage.c
M test/src/common/harnessInfo.c
M test/src/module/common/iniTest.c
M test/src/module/common/ioHttpTest.c
M test/src/module/common/memContextTest.c
M test/src/module/common/objectTest.c
M test/src/module/common/typeBufferTest.c
M test/src/module/common/typeKeyValueTest.c
M test/src/module/common/typeListTest.c
M test/src/module/common/typeStringTest.c
M test/src/module/common/typeVariantTest.c
M test/src/module/info/manifestTest.c
M test/src/module/postgres/clientTest.c
M test/src/module/protocol/protocolTest.c
M test/src/module/storage/posixTest.c

Use MEM_CONTEXT_BEGIN() block in varFree().

commit   : b5fa9951e36641d0ad751f0c89751e84b5b1df0d    
  
author   : David Steele <[email protected]>    
date     : Fri, 17 Jan 2020 13:08:47 -0700    
  
committer: David Steele <[email protected]>    
date     : Fri, 17 Jan 2020 13:08:47 -0700    

Click here for diff

We probably arrived at this unusual construction because of the complexity of getting the mem context.  Whether or not this is a good way to store the mem context, it still makes sense to use the standard pattern for switching mem contexts.  

M src/common/type/variant.c

Use MEM_CONTEXT_NEW_BEGIN() block instead of memContextNew().

commit   : c6d6b7dbefb62578be64133e36836fc936945555    
  
author   : David Steele <[email protected]>    
date     : Fri, 17 Jan 2020 11:58:41 -0700    
  
committer: David Steele <[email protected]>    
date     : Fri, 17 Jan 2020 11:58:41 -0700    

Click here for diff

A few places were using just memContextNew(), probably because they did not immediately need to create anything in the new context, but it's better if we use the same pattern everywhere, even if it results in a few extra mem context switches.  

M src/common/lock.c
M src/protocol/helper.c
M src/storage/helper.c
M test/src/common/harnessLog.c

Add braces and spaces for clarity.

commit   : d3be1e41a4cdb5b7bbc40d73de8f185b22a97efd    
  
author   : David Steele <[email protected]>    
date     : Thu, 16 Jan 2020 16:23:40 -0700    
  
committer: David Steele <[email protected]>    
date     : Thu, 16 Jan 2020 16:23:40 -0700    

Click here for diff

This should make it a little easier to see how the TRY macros work together.  

M src/common/error.h

Use MEM_CONTEXT_BEGIN() block instead of memContextSwitch().

commit   : 254f79803fca8cd591849b77d1266c79580ab08c    
  
author   : David Steele <[email protected]>    
date     : Thu, 16 Jan 2020 16:20:59 -0700    
  
committer: David Steele <[email protected]>    
date     : Thu, 16 Jan 2020 16:20:59 -0700    

Click here for diff

This is the standard pattern but was missed here.  

M src/storage/s3/storage.c

Use MEM_CONTEXT_NEW_BEGIN() block.

commit   : 8068a610d566cf9b5bcc79a3602a3a8442192bad    
  
author   : David Steele <[email protected]>    
date     : Thu, 16 Jan 2020 16:19:45 -0700    
  
committer: David Steele <[email protected]>    
date     : Thu, 16 Jan 2020 16:19:45 -0700    

Click here for diff

This pattern makes more sense.  The prior code was probably copy-pasted from code with slightly different requirements.  

M src/common/user.c

Add missing semicolon.

commit   : 4274fcbf6f99f6d8414d2ba095809341bcf56797    
  
author   : David Steele <[email protected]>    
date     : Thu, 16 Jan 2020 14:42:01 -0700    
  
committer: David Steele <[email protected]>    
date     : Thu, 16 Jan 2020 14:42:01 -0700    

Click here for diff

This worked when the FUNCTION_TEST_RETURN_VOID() macro expanded to nothing because of the final semicolon.  If the FUNCTION_TEST_RETURN_VOID() macro expanded to something then there was one semicolon too few.  

M src/common/ini.c

Disable RHEL package builds since upstream is broken.

commit   : 731ffcfb3d77e6a9d17091f9819cf3e21e25d951    
  
author   : David Steele <[email protected]>    
date     : Thu, 16 Jan 2020 14:29:04 -0700    
  
committer: David Steele <[email protected]>    
date     : Thu, 16 Jan 2020 14:29:04 -0700    

Click here for diff

M .travis.yml

Reclassify Perl and LibC code as test/harness.

commit   : e81629b4420759f80bd18017ee47b89942c90090    
  
author   : David Steele <[email protected]>    
date     : Wed, 15 Jan 2020 13:53:30 -0700    
  
committer: David Steele <[email protected]>    
date     : Wed, 15 Jan 2020 13:53:30 -0700    

Click here for diff

These were still being included in the core totals but they are no longer used by core.  

M test/code-count/file-type.yaml
M test/lib/pgBackRestTest/Common/CodeCountTest.pm

Remove -s from make instructions.

commit   : 193b78e150919470b33f3941be03f0ef589a3e79    
  
author   : David Steele <[email protected]>    
date     : Wed, 15 Jan 2020 13:40:17 -0700    
  
committer: David Steele <[email protected]>    
date     : Wed, 15 Jan 2020 13:40:17 -0700    

Click here for diff

It's a good option but not required so let the user make the choice.  
  
Also combine configure and make into a single line.  

M doc/xml/user-guide.xml

Begin v2.22 development.

commit   : 9414ad2300f5ab87000da333fbbfa58228dae0c4    
  
author   : David Steele <[email protected]>    
date     : Wed, 15 Jan 2020 13:29:52 -0700    
  
committer: David Steele <[email protected]>    
date     : Wed, 15 Jan 2020 13:29:52 -0700    

Click here for diff

M doc/resource/git-history.cache
M doc/xml/release.xml
M lib/pgBackRest/Version.pm
M src/configure
M src/configure.ac
M src/version.h