From c250a5e77182bd47347c790d9f32bfa71bafe6d0 Mon Sep 17 00:00:00 2001 From: Mason Sharp Date: Tue, 17 Nov 2026 10:52:10 -0800 Subject: [PATCH] Initial prep for v5.0.15. Bump SPOCK_VERSION to 5.0.15 and add the empty sql/spock--5.0.14--5.0.15.sql upgrade script. Update the regression expected output and the pkg/common.sh fallbacks. Start the 5.0.15 release notes with the fix for a failover slot copy that stayed temporary on a standby built while the primary was idle, and so was dropped at an unplanned failover (#730). --- docs/spock_release_notes.md | 16 ++++++++++++++++ include/spock.h | 4 ++-- pkg/common.sh | 4 ++-- sql/spock--5.0.14--5.0.15.sql | 6 ++++++ tests/regress/expected/init.out | 2 +- tests/regress/expected/init_1.out | 2 +- 6 files changed, 28 insertions(+), 6 deletions(-) create mode 100644 sql/spock--5.0.14--5.0.15.sql diff --git a/docs/spock_release_notes.md b/docs/spock_release_notes.md index 4b515455..c6db2f01 100644 --- a/docs/spock_release_notes.md +++ b/docs/spock_release_notes.md @@ -1,5 +1,21 @@ # Spock Release Notes +## Spock 5.0.15 + +### Upgrade Notes +* There are no schema changes in 5.0.15. + +### Bug Fixes +* When a standby was built while the primary was idle, the failover slot + worker kept each new slot copy temporary for as long as the primary stayed + idle. The copy started at the standby's own position, ahead of the + primary's slot, and an idle primary never moved its slot past that point. + A temporary copy is dropped at promotion, so after an unplanned failover + the promoted node had no slot and the subscriber failed with `replication + slot ... does not exist`. A new copy now starts at the primary slot's + `restart_lsn`, as PostgreSQL's own slot sync does, and is made permanent + on the same pass when the standby still has that WAL. + ## Spock 5.0.14 ### Upgrade Notes diff --git a/include/spock.h b/include/spock.h index b9bfcaed..a68e3a7a 100644 --- a/include/spock.h +++ b/include/spock.h @@ -24,8 +24,8 @@ #include "spock_fe.h" #include "spock_node.h" -#define SPOCK_VERSION "5.0.14" -#define SPOCK_VERSION_NUM 50014 +#define SPOCK_VERSION "5.0.15" +#define SPOCK_VERSION_NUM 50015 #define EXTENSION_NAME "spock" #define SPOCK_SECLABEL_PROVIDER "spock" diff --git a/pkg/common.sh b/pkg/common.sh index 4c83f774..2a9c1159 100644 --- a/pkg/common.sh +++ b/pkg/common.sh @@ -25,11 +25,11 @@ export PG_MAJOR_VERSION="$(echo "$PG_VERSION" | cut -d. -f1)" # only used as the clone fallback when release-artifacts/ has no staged # tarball (i.e. a local build outside the workflow). export PG_SPOCK_REPO="https://github.com/pgEdge/spock.git" -export SPOCK_BRANCH="${COMPONENT_BRANCH:-v5.0.14-rc.1}" +export SPOCK_BRANCH="${COMPONENT_BRANCH:-v5.0.15-rc.1}" # Upstream version, suffix-stripped (e.g. 5.0.11). Used for the source # tarball name, its internal directory, and the RPM Version. -export SPOCK_VERSION="${COMPONENT_VERSION:-5.0.14}" +export SPOCK_VERSION="${COMPONENT_VERSION:-5.0.15}" # Appending 0 after 5 to create major version 50 even in case of 5.1.0 export SPOCK_MAJOR_VERSION=$(echo ${SPOCK_VERSION} | cut -d. -f1 | tr -d .)0 diff --git a/sql/spock--5.0.14--5.0.15.sql b/sql/spock--5.0.14--5.0.15.sql new file mode 100644 index 00000000..80a0582b --- /dev/null +++ b/sql/spock--5.0.14--5.0.15.sql @@ -0,0 +1,6 @@ +/* spock--5.0.14--5.0.15.sql */ + +-- complain if script is sourced in psql, rather than via ALTER EXTENSION +\echo Use "ALTER EXTENSION spock UPDATE TO '5.0.15'" to load this file. \quit + +-- No schema changes in 5.0.15. diff --git a/tests/regress/expected/init.out b/tests/regress/expected/init.out index abe8abb5..c8859e82 100644 --- a/tests/regress/expected/init.out +++ b/tests/regress/expected/init.out @@ -49,7 +49,7 @@ CREATE EXTENSION IF NOT EXISTS spock; List of installed extensions Name | Version | Schema | Description -------+---------+--------+-------------------------------- - spock | 5.0.14 | spock | PostgreSQL Logical Replication + spock | 5.0.15 | spock | PostgreSQL Logical Replication (1 row) SELECT * FROM spock.node_create(node_name := 'test_provider', dsn := (SELECT provider_dsn FROM spock_regress_variables()) || ' user=super'); diff --git a/tests/regress/expected/init_1.out b/tests/regress/expected/init_1.out index 5789f964..0d59fd53 100644 --- a/tests/regress/expected/init_1.out +++ b/tests/regress/expected/init_1.out @@ -49,7 +49,7 @@ CREATE EXTENSION IF NOT EXISTS spock; List of installed extensions Name | Version | Default version | Schema | Description -------+---------+-----------------+--------+-------------------------------- - spock | 5.0.14 | 5.0.14 | spock | PostgreSQL Logical Replication + spock | 5.0.15 | 5.0.15 | spock | PostgreSQL Logical Replication (1 row) SELECT * FROM spock.node_create(node_name := 'test_provider', dsn := (SELECT provider_dsn FROM spock_regress_variables()) || ' user=super');