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

v2.23: Bug Fix

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. (Reviewed by Cynthia Shang. Reported by Vitaliy Kukharik.)

Improvements:

* Use pkg-config instead of xml2-config for libxml2 build options. (Contributed by David Steele, Adrian Vondendriesch.)
* Validate checksums are set in the manifest on backup/restore. (Reviewed by Cynthia Shang.)
This commit is contained in:
David Steele 2020-01-26 22:38:21 -07:00
parent 7ab07dc580
commit 2358d34485
9 changed files with 737 additions and 684 deletions

View File

@ -4,7 +4,7 @@
pgBackRest aims to be a simple, reliable backup and restore solution that can seamlessly scale up to the largest databases and workloads by utilizing algorithms that are optimized for database-specific requirements.
pgBackRest [v2.22](https://github.com/pgbackrest/pgbackrest/releases/tag/release/2.22) is the current stable release. Release notes are on the [Releases](http://www.pgbackrest.org/release.html) page.
pgBackRest [v2.23](https://github.com/pgbackrest/pgbackrest/releases/tag/release/2.23) is the current stable release. Release notes are on the [Releases](http://www.pgbackrest.org/release.html) page.
Documentation for v1 can be found [here](http://www.pgbackrest.org/1). No further releases are planned for v1 because v2 is backward-compatible with v1 options and repositories.

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,67 @@
[
{
"commit": "7ab07dc580989452d807332bc91d26a42e5a0d3a",
"date": "2020-01-26 21:58:59 -0700",
"subject": "Validate checksums are set in the manifest on backup/restore.",
"body": "This is a modest start but it addresses the specific issue that was caused by the bug fixed in 45ec694a. This validation will produce an immediate error rather than erroring out partway through the restore.\n\nMore validations are planned but this is the most important one and seems safest for this release."
},
{
"commit": "45ec694af22dda84b124f0df242bbcfdd28726d1",
"date": "2020-01-26 13:19:13 -0700",
"subject": "Fix missing files corrupting the manifest.",
"body": "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.\n\nThe issue was that removing files from the manifest invalidated the pointers stored in the processing queues. When a file was removed, all the pointers shifted to the next file in the list, causing a file to be unprocessed. Since the unprocessed file was still in the manifest it would be saved with no checksum, causing a failure on restore.\n\nWhen process-max was > 1 then the bug would often not express since the file had already been pulled from the queue and updates to the manifest are done by name rather than by pointer."
},
{
"commit": "9b47ff2746b74bf41d20fa43d6ed2697b0a99087",
"date": "2020-01-26 12:29:53 -0700",
"subject": "Sort last processing queue on backup from standby.",
"body": "The last queue was not being sorted when a primary queue was added first.\n\nThis did not affect the backup or integrity but could lead to slightly lower performance since large files were not always copied first."
},
{
"commit": "0444d3741423004e0f94116b528d94090c1e4303",
"date": "2020-01-24 10:43:47 -0700",
"subject": "Remove obsolete include to ../libc."
},
{
"commit": "b1c5885017c035320804c5d16ed57b149a33ab10",
"date": "2020-01-24 10:40:42 -0700",
"subject": "Add lib path for libpq in case it is in a non-standard location."
},
{
"commit": "90abc3cf170a3d5da8bbc5307cf5032d6af5ed6c",
"date": "2020-01-24 10:08:05 -0700",
"subject": "Use pkg-config instead of xml2-config for libxml2 build options.",
"body": "pkg-config is a generic way to get build options rather than relying on a package-specific utility.\n\nXML2_CONFIG can be used to override this utility for systems that do not ship pkg-config."
},
{
"commit": "b134175fc7a98836f49f20d552f7c31138b66b1b",
"date": "2020-01-23 14:15:58 -0700",
"subject": "Use designated initializers to initialize structs.",
"body": "Previously memNew() used memset() to initialize all struct members to 0, NULL, false, etc. While this appears to work in practice, it is a violation of the C specification. For instance, NULL == 0 must be true but neither NULL nor 0 must be represented with all zero bits.\n\nInstead use designated initializers to initialize structs. These guarantee that struct members will be properly initialized even if they are not specified in the initializer. Note that due to a quirk in the C99 specification at least one member must be explicitly initialized even if it needs to be the default value.\n\nSince pre-zeroed memory is no longer required, adjust memAllocInternal()/memReallocInternal() to return raw memory and update dependent functions accordingly. All instances of memset() have been removed except in debug/test code where needed.\n\nAdd memMewPtrArray() to allocate an array of pointers and automatically set all pointers to NULL.\n\nRename memGrowRaw() to the more logical memResize()."
},
{
"commit": "cf2024beafba82b3899d9c46c7ea64716835a292",
"date": "2020-01-21 18:47:14 -0700",
"subject": "Add XML2_CONFIG environment variable to configure.",
"body": "This allows the default 'xml2-config' to be replaced with, e.g. 'pkg-config libxml-2.0', for libxml2 configuration."
},
{
"commit": "600a51815feacb149add2bb777d6a3b4d284c8aa",
"date": "2020-01-21 18:42:22 -0700",
"subject": "Set client_encoding to UTF8 on PostgreSQL connect.",
"body": "This is the only non-ASCII character encoding we have tested so make sure that's all we get from PostgreSQL."
},
{
"commit": "1706c599bd1c4d1eeac5bf44d1811e0259809027",
"date": "2020-01-21 18:37:43 -0700",
"subject": "Set encoding to UTF8 for Debian documentation containers.",
"body": "This allows testing multi-byte encodings in PostgreSQL."
},
{
"commit": "382ddfd79dfec12f4cdf821f36a47dd404a51356",
"date": "2020-01-21 16:43:44 -0700",
"subject": "Begin v2.23 development."
},
{
"commit": "bae6e1c9e3a035f3793739ef1b469015777aa70b",
"date": "2020-01-21 16:12:33 -0700",

View File

@ -29,8 +29,8 @@
<table-row>
<table-cell>command/backup</table-cell>
<table-cell>33/33 (100.0%)</table-cell>
<table-cell>464/464 (100.0%)</table-cell>
<table-cell>1085/1085 (100.0%)</table-cell>
<table-cell>468/468 (100.0%)</table-cell>
<table-cell>1090/1090 (100.0%)</table-cell>
</table-row>
<table-row>
@ -86,7 +86,7 @@
<table-cell>command/restore</table-cell>
<table-cell>25/25 (100.0%)</table-cell>
<table-cell>442/442 (100.0%)</table-cell>
<table-cell>880/880 (100.0%)</table-cell>
<table-cell>881/881 (100.0%)</table-cell>
</table-row>
<table-row>
@ -105,23 +105,23 @@
<table-row>
<table-cell>common</table-cell>
<table-cell>151/151 (100.0%)</table-cell>
<table-cell>490/490 (100.0%)</table-cell>
<table-cell>1560/1560 (100.0%)</table-cell>
<table-cell>153/153 (100.0%)</table-cell>
<table-cell>496/496 (100.0%)</table-cell>
<table-cell>1568/1568 (100.0%)</table-cell>
</table-row>
<table-row>
<table-cell>common/compress/gzip</table-cell>
<table-cell>16/16 (100.0%)</table-cell>
<table-cell>24/24 (100.0%)</table-cell>
<table-cell>168/168 (100.0%)</table-cell>
<table-cell>163/163 (100.0%)</table-cell>
</table-row>
<table-row>
<table-cell>common/crypto</table-cell>
<table-cell>26/26 (100.0%)</table-cell>
<table-cell>74/74 (100.0%)</table-cell>
<table-cell>335/335 (100.0%)</table-cell>
<table-cell>332/332 (100.0%)</table-cell>
</table-row>
<table-row>
@ -135,7 +135,7 @@
<table-cell>common/io</table-cell>
<table-cell>45/45 (100.0%)</table-cell>
<table-cell>108/108 (100.0%)</table-cell>
<table-cell>492/492 (100.0%)</table-cell>
<table-cell>488/488 (100.0%)</table-cell>
</table-row>
<table-row>
@ -149,63 +149,63 @@
<table-cell>common/io/http</table-cell>
<table-cell>37/37 (100.0%)</table-cell>
<table-cell>164/164 (100.0%)</table-cell>
<table-cell>472/472 (100.0%)</table-cell>
<table-cell>468/468 (100.0%)</table-cell>
</table-row>
<table-row>
<table-cell>common/io/tls</table-cell>
<table-cell>17/17 (100.0%)</table-cell>
<table-cell>88/88 (100.0%)</table-cell>
<table-cell>292/292 (100.0%)</table-cell>
<table-cell>285/285 (100.0%)</table-cell>
</table-row>
<table-row>
<table-cell>common/type</table-cell>
<table-cell>249/249 (100.0%)</table-cell>
<table-cell>554/554 (100.0%)</table-cell>
<table-cell>2899/2899 (100.0%)</table-cell>
<table-cell>2894/2894 (100.0%)</table-cell>
</table-row>
<table-row>
<table-cell>config</table-cell>
<table-cell>101/101 (100.0%)</table-cell>
<table-cell>590/590 (100.0%)</table-cell>
<table-cell>1441/1441 (100.0%)</table-cell>
<table-cell>1435/1435 (100.0%)</table-cell>
</table-row>
<table-row>
<table-cell>db</table-cell>
<table-cell>27/27 (100.0%)</table-cell>
<table-cell>100/100 (100.0%)</table-cell>
<table-cell>367/367 (100.0%)</table-cell>
<table-cell>368/368 (100.0%)</table-cell>
</table-row>
<table-row>
<table-cell>info</table-cell>
<table-cell>116/116 (100.0%)</table-cell>
<table-cell>696/696 (100.0%)</table-cell>
<table-cell>2303/2303 (100.0%)</table-cell>
<table-cell>117/117 (100.0%)</table-cell>
<table-cell>704/704 (100.0%)</table-cell>
<table-cell>2322/2322 (100.0%)</table-cell>
</table-row>
<table-row>
<table-cell>postgres</table-cell>
<table-cell>37/37 (100.0%)</table-cell>
<table-cell>122/122 (100.0%)</table-cell>
<table-cell>426/426 (100.0%)</table-cell>
<table-cell>424/424 (100.0%)</table-cell>
</table-row>
<table-row>
<table-cell>protocol</table-cell>
<table-cell>66/66 (100.0%)</table-cell>
<table-cell>182/182 (100.0%)</table-cell>
<table-cell>812/812 (100.0%)</table-cell>
<table-cell>186/186 (100.0%)</table-cell>
<table-cell>808/808 (100.0%)</table-cell>
</table-row>
<table-row>
<table-cell>storage</table-cell>
<table-cell>67/67 (100.0%)</table-cell>
<table-cell>194/194 (100.0%)</table-cell>
<table-cell>783/783 (100.0%)</table-cell>
<table-cell>774/774 (100.0%)</table-cell>
</table-row>
<table-row>
@ -219,26 +219,26 @@
<table-cell>storage/posix</table-cell>
<table-cell>28/28 (100.0%)</table-cell>
<table-cell>159/160 (99.38%)</table-cell>
<table-cell>500/500 (100.0%)</table-cell>
<table-cell>493/493 (100.0%)</table-cell>
</table-row>
<table-row>
<table-cell>storage/remote</table-cell>
<table-cell>29/29 (100.0%)</table-cell>
<table-cell>108/108 (100.0%)</table-cell>
<table-cell>624/624 (100.0%)</table-cell>
<table-cell>615/615 (100.0%)</table-cell>
</table-row>
<table-row>
<table-cell>storage/s3</table-cell>
<table-cell>29/29 (100.0%)</table-cell>
<table-cell>126/126 (100.0%)</table-cell>
<table-cell>599/599 (100.0%)</table-cell>
<table-cell>587/587 (100.0%)</table-cell>
</table-row>
<table-row>
<table-cell>TOTAL</table-cell>
<table-cell>1219/1219 (100.0%)</table-cell>
<table-cell>5731/5732 (99.98%)</table-cell>
<table-cell>18525/18525 (100.0%)</table-cell>
<table-cell>1222/1222 (100.0%)</table-cell>
<table-cell>5753/5754 (99.98%)</table-cell>
<table-cell>18482/18482 (100.0%)</table-cell>
</table-row>

View File

@ -12,7 +12,7 @@
</intro>
<release-list>
<release date="XXXX-XX-XX" version="2.23dev" title="UNDER DEVELOPMENT">
<release date="2020-01-27" version="2.23" title="Bug Fix">
<release-core-list>
<release-bug-list>
<release-item>

View File

@ -39,7 +39,7 @@ push @EXPORT, qw(projectBin projectBinSet);
# Defines the current version of the BackRest executable. The version number is used to track features but does not affect what
# repositories or manifests can be read - that's the job of the format number.
#-----------------------------------------------------------------------------------------------------------------------------------
use constant PROJECT_VERSION => '2.23dev';
use constant PROJECT_VERSION => '2.23';
push @EXPORT, qw(PROJECT_VERSION);
# Repository Format Number

18
src/configure vendored
View File

@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for pgBackRest 2.23dev.
# Generated by GNU Autoconf 2.69 for pgBackRest 2.23.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@ -577,8 +577,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='pgBackRest'
PACKAGE_TARNAME='pgbackrest'
PACKAGE_VERSION='2.23dev'
PACKAGE_STRING='pgBackRest 2.23dev'
PACKAGE_VERSION='2.23'
PACKAGE_STRING='pgBackRest 2.23'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@ -1242,7 +1242,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures pgBackRest 2.23dev to adapt to many kinds of systems.
\`configure' configures pgBackRest 2.23 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1304,7 +1304,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of pgBackRest 2.23dev:";;
short | recursive ) echo "Configuration of pgBackRest 2.23:";;
esac
cat <<\_ACEOF
@ -1393,7 +1393,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
pgBackRest configure 2.23dev
pgBackRest configure 2.23
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@ -1691,7 +1691,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by pgBackRest $as_me 2.23dev, which was
It was created by pgBackRest $as_me 2.23, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@ -4222,7 +4222,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by pgBackRest $as_me 2.23dev, which was
This file was extended by pgBackRest $as_me 2.23, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@ -4284,7 +4284,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
pgBackRest config.status 2.23dev
pgBackRest config.status 2.23
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"

View File

@ -1,6 +1,6 @@
# Initialize configuration
AC_PREREQ([2.69])
AC_INIT([pgBackRest], [2.23dev])
AC_INIT([pgBackRest], [2.23])
AC_CONFIG_SRCDIR([version.h])
# Check compiler

View File

@ -23,6 +23,6 @@ repository will be invalid unless migration functions are written.
/***********************************************************************************************************************************
Software version. Currently this value is maintained in Version.pm and updated by test.pl.
***********************************************************************************************************************************/
#define PROJECT_VERSION "2.23dev"
#define PROJECT_VERSION "2.23"
#endif