Skip to content

Commit

Permalink
Prepare/release 1.5.2 (#710)
Browse files Browse the repository at this point in the history
* Update changelog.

* Update parson JSON parsing lib.

* Update version numbers.
  • Loading branch information
DimCitus authored May 20, 2021
1 parent d945ca1 commit 125bb19
Show file tree
Hide file tree
Showing 15 changed files with 116 additions and 14 deletions.
39 changes: 39 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,42 @@
### pg_auto_failover v1.5.2 (May 20, 2021) ###

This is a bugfix release for the v1.5 series.

In addition to bug fixes, this release also contains a lift of the
restriction to always have at least two nodes with a non-zero candidate
priority in a group. It is now possible to use pg_auto_failover and only
have manual failover.

If you're using the output from the command `pg_autoctl show settings
--json` please notice that we changed the JSON format we use in the output.
See #697 for details.

#### Added
* Check that a "replication" connection is possible before pg_rewind. [#665]
* Allow manual promotion of nodes with candidate priority zero. [#661]
* Implement a new configuration option listen_notifications_timeout. [#677]
* Log monitor health changes as events. [#703]

#### Changed
* Use PGDATA owner for the systemd service file. [#666]
* Remove logging of connection password in monitor string [#512]
* Improve docs color contrast for accessibility [#674]
* Fix pg_autoctl show settings --json output. [#697]

#### Fixed
* Docs: typo fix for Postgres client certificate file (postgresql.crt). [#652]
* Plug connection leaks found during profiling [#582]
* Review find_extension_control_file[) error handling. (#659]
* Fix/identify system before pg basebackup [#658]
* Fix a pipe issue and return code [#619]
* Fix memory leak allocated by createPQExpBuffer() (#671]
* Fix parsing pg version string for replication slots support on standby. [#676]
* Fix/debian cluster for the monitor [#681]
* Fix a memory leak in uri_contains_password. [#687]
* Fix a memory leak in BuildNodesArrayValues. [#693]
* Complete transition of a second [or greater) failed primary (#706]


### pg_auto_failover v1.5.1 (March 24, 2021) ###

This release contains monitor schema changes, so the monitor extension gets
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,11 @@ AZURE_LOCATION ?= francecentral
# Pick a version of Postgres and pg_auto_failover packages to install
# in our target Azure VMs when provisionning
#
# sudo apt-get install -q -y postgresql-13-auto-failover-1.5=1.5.1
# sudo apt-get install -q -y postgresql-13-auto-failover-1.5=1.5.2
# postgresql-${AZ_PG_VERSION}-auto-failover-${AZ_PGAF_DEB_VERSION}=${AZ_PGAF_VERSION}
AZ_PG_VERSION ?= 13
AZ_PGAF_DEB_VERSION ?= 1.5
AZ_PGAF_DEB_REVISION ?= 1.5.1-1
AZ_PGAF_DEB_REVISION ?= 1.5.2-1

export AZ_PG_VERSION
export AZ_PGAF_DEB_VERSION
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def __init__(self, **options):
# The short X.Y version.
version = "1.5"
# The full version, including alpha/beta/rc tags.
release = "1.5.1"
release = "1.5.2"

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
9 changes: 6 additions & 3 deletions src/bin/lib/parson/parson.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
SPDX-License-Identifier: MIT
Parson 1.1.0 ( http://kgabis.github.com/parson/ )
Copyright (c) 2012 - 2020 Krzysztof Gabis
Parson 1.1.2 ( http://kgabis.github.com/parson/ )
Copyright (c) 2012 - 2021 Krzysztof Gabis
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -742,6 +742,9 @@ static JSON_Value * parse_object_value(const char **string, size_t nesting) {
new_key = get_quoted_string(string, &key_len);
/* We do not support key names with embedded \0 chars */
if (new_key == NULL || key_len != strlen(new_key)) {
if (new_key) {
parson_free(new_key);
}
json_value_free(output_value);
return NULL;
}
Expand Down Expand Up @@ -960,7 +963,7 @@ static int json_serialize_to_buffer_r(const JSON_Value *value, char *buf, int le
if (is_pretty) {
APPEND_STRING(" ");
}
temp_value = json_object_get_value(object, key);
temp_value = json_object_get_value_at(object, i);
written = json_serialize_to_buffer_r(temp_value, buf, level+1, is_pretty, num_buf);
if (written < 0) {
return -1;
Expand Down
4 changes: 2 additions & 2 deletions src/bin/lib/parson/parson.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
SPDX-License-Identifier: MIT
Parson 1.1.0 ( http://kgabis.github.com/parson/ )
Copyright (c) 2012 - 2020 Krzysztof Gabis
Parson 1.1.2 ( http://kgabis.github.com/parson/ )
Copyright (c) 2012 - 2021 Krzysztof Gabis
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 3 additions & 1 deletion src/bin/lib/parson/tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
SPDX-License-Identifier: MIT
Parson ( http://kgabis.github.com/parson/ )
Copyright (c) 2012 - 2020 Krzysztof Gabis
Copyright (c) 2012 - 2021 Krzysztof Gabis
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -588,6 +588,8 @@ void test_memory_leaks() {
TEST(json_object_set_boolean(NULL, "lorem", 0) == JSONFailure);
TEST(json_object_set_null(NULL, "lorem") == JSONFailure);

TEST(json_parse_string("{\"\\u0000\"") == NULL);

TEST(malloc_count == 0);
}

Expand Down
1 change: 1 addition & 0 deletions src/bin/lib/parson/tests/test_1_1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"digit": "0123456789",
"0123456789": "digit",
"special": "`1~!@#$%^&*()_+-={':[,]}|;.</>?",
"nullchar": "abc\u0000def",
"hex": "\u0123\u4567\u89AB\uCDEF\uabcd\uef4A",
"true": true,
"false": false,
Expand Down
1 change: 1 addition & 0 deletions src/bin/lib/parson/tests/test_2.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"utf string" : "\u006corem\u0020ipsum",
"utf-8 string": "あいうえお",
"surrogate string": "lorem\uD834\uDD1Eipsum\uD834\uDF67lorem",
"string with null": "abc\u0000def",
"positive one" : 1,
"negative one" : -1,
"pi" : 3.14,
Expand Down
1 change: 1 addition & 0 deletions src/bin/lib/parson/tests/test_2_comments.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"utf string" : "\u006corem\u0020ipsum", // lorem ipsum //
"utf-8 string": "あいうえお", // /* lorem ipsum */
"surrogate string": "lorem\uD834\uDD1Eipsum\uD834\uDF67lorem",
"string with null": "abc\u0000def",
"positive one" : 1,
"negative one" : -1,
"pi" : 3.14,
Expand Down
1 change: 1 addition & 0 deletions src/bin/lib/parson/tests/test_2_pretty.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"utf string": "lorem ipsum",
"utf-8 string": "あいうえお",
"surrogate string": "lorem𝄞ipsum𝍧lorem",
"string with null": "abc\u0000def",
"positive one": 1,
"negative one": -1,
"pi": 3.1400000000000001,
Expand Down
1 change: 1 addition & 0 deletions src/bin/lib/parson/tests/test_2_serialized.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"string":"lorem ipsum","utf string":"lorem ipsum","utf-8 string":"あいうえお","surrogate string":"lorem𝄞ipsum𝍧lorem","string with null":"abc\u0000def","positive one":1,"negative one":-1,"pi":3.1400000000000001,"hard to parse number":-0.00031399999999999999,"big int":2147483647,"big uint":4294967295,"boolean true":true,"boolean false":false,"null":null,"string array":["lorem","ipsum"],"x^2 array":[0,1,4,9,16,25,36,49,64,81,100],"\/*":null,"object":{"nested string":"str","nested true":true,"nested false":false,"nested null":null,"nested number":123,"nested array":["lorem","ipsum"],"nested object":{"lorem":"ipsum"}},"*\/":null,"\/**\/":"comment","\/\/":"comment","url":"https:\/\/www.example.com\/search?q=12345","escaped chars":"\" \\ \/","empty object":{},"empty array":[]}
52 changes: 52 additions & 0 deletions src/bin/lib/parson/tests/test_2_serialized_pretty.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"string": "lorem ipsum",
"utf string": "lorem ipsum",
"utf-8 string": "あいうえお",
"surrogate string": "lorem𝄞ipsum𝍧lorem",
"string with null": "abc\u0000def",
"positive one": 1,
"negative one": -1,
"pi": 3.1400000000000001,
"hard to parse number": -0.00031399999999999999,
"big int": 2147483647,
"big uint": 4294967295,
"boolean true": true,
"boolean false": false,
"null": null,
"string array": [
"lorem",
"ipsum"
],
"x^2 array": [
0,
1,
4,
9,
16,
25,
36,
49,
64,
81,
100
],
"\/*": null,
"object": {
"nested string": "str",
"nested true": true,
"nested false": false,
"nested null": null,
"nested number": 123,
"nested array": [
"lorem",
"ipsum"
]
},
"*\/": null,
"\/**\/": "comment",
"\/\/": "comment",
"url": "https:\/\/www.example.com\/search?q=12345",
"escaped chars": "\" \\ \/",
"empty object": {},
"empty array": []
}
1 change: 1 addition & 0 deletions src/bin/lib/parson/tests/test_5.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@
"utf string" : "\u006corem\u0020ipsum",
"utf-8 string": "あいうえお",
"surrogate string": "lorem\uD834\uDD1Eipsum\uD834\uDF67lorem",
"string with null": "abc\u0000def",
"windows path": "C:\\Windows\\Path"
}
8 changes: 4 additions & 4 deletions src/bin/pg_autoctl/azure.c
Original file line number Diff line number Diff line change
Expand Up @@ -1132,7 +1132,7 @@ azure_build_pg_autoctl(AzureRegionResources *azRegion)
*
* AZ_PG_VERSION ?= 13
* AZ_PGAF_DEB_VERSION ?= 1.5
* AZ_PGAF_DEB_REVISION ?= 1.5.1-1
* AZ_PGAF_DEB_REVISION ?= 1.5.2-1
*/
bool
azure_prepare_target_versions(KeyVal *env)
Expand All @@ -1147,7 +1147,7 @@ azure_prepare_target_versions(KeyVal *env)
/* default values */
sformat(env->values[0], MAXCONNINFO, "13"); /* AZ_PG_VERSION */
sformat(env->values[1], MAXCONNINFO, "1.5"); /* AZ_PGAF_DEB_VERSION */
sformat(env->values[2], MAXCONNINFO, "1.5.1-1"); /* AZ_PGAF_DEB_REVISION */
sformat(env->values[2], MAXCONNINFO, "1.5.2-1"); /* AZ_PGAF_DEB_REVISION */

for (int i = 0; i < 3; i++)
{
Expand All @@ -1174,8 +1174,8 @@ azure_prepare_target_versions(KeyVal *env)
* target pg_auto_failover package on the Azure VMs.
*
* sudo apt-get install -q -y \
* postgresql-13-auto-failover-1.5=1.5.1-1 \
* pg-auto-failover-cli-1.5=1.5.1-1
* postgresql-13-auto-failover-1.5=1.5.2-1 \
* pg-auto-failover-cli-1.5=1.5.2-1
*
* We are using environment variables to fill in the actual version numbers,
* and we hard-code some defaults in case the environment has not be provided
Expand Down
2 changes: 1 addition & 1 deletion src/bin/pg_autoctl/defaults.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#define PG_AUTOCTL_STATE_VERSION 1

/* additional version information for printing version on CLI */
#define PG_AUTOCTL_VERSION "1.5.1"
#define PG_AUTOCTL_VERSION "1.5.2"

/* version of the extension that we requite to talk to on the monitor */
#define PG_AUTOCTL_EXTENSION_VERSION "1.5"
Expand Down

0 comments on commit 125bb19

Please sign in to comment.