public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Michal Schorm <mschorm@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/pg_auto_failover] rawhide: Rebase to 2.2
Date: Mon, 13 Jul 2026 17:26:17 GMT	[thread overview]
Message-ID: <178396357793.1.4430573920189383173.rpms-pg_auto_failover-294ddf687193@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/pg_auto_failover
            Branch : rawhide
            Commit : 294ddf687193f4a1ed34a8a2a29be8b37a4cd7d1
            Author : Michal Schorm <mschorm@redhat.com>
            Date   : 2026-07-02T12:23:40+02:00
            Stats  : +251/-5 in 3 file(s)
            URL    : https://src.fedoraproject.org/rpms/pg_auto_failover/c/294ddf687193f4a1ed34a8a2a29be8b37a4cd7d1?branch=rawhide

            Log:
            Rebase to 2.2

'pg_auto_failover' provides a PostgreSQL extension ('pgautofailover') and
a 'pg_autoctl' CLI daemon for automated failover and high-availability.

Upstream changes (2.1 -> 2.2, released 2025-04-03, 10 commits):
- Added support for PostgreSQL 17
- Dropped support for PostgreSQL 11 and 12
- Dropped 32-bit architecture support
- 'pg_ctl' argument ordering fixed for PG 17 compatibility
- Citus bumped from 11.1.3 to 13.0.0
- Migrated from 'docker-compose' to 'docker compose' CLI plugin
- No new CLI subcommands or configuration options

Extension version: 2.1 -> 2.2. Upgrade script ships:
  'pgautofailover--2.1--2.2.sql'
  (no-op version bump -- schema is identical between 2.1 and 2.2)
Users can run 'ALTER EXTENSION pgautofailover UPDATE' for in-place upgrade.
Monitor/worker protocol unchanged ('PG_AUTOCTL_STATE_VERSION' = 1).

PostgreSQL 18 support cherry-picked from upstream 'main' branch:
  f763a2645e22 - Include PG18 in supported versions (Christoph Berg)
  02e95cab6666 - Fix missing variable declarations (Bradford D. Boyle)
  efdbb5f5bfdb - Fix included copy of snprintf (Bradford D. Boyle)
  6001bd85a458 - Add expected output for upgrade test with psql 18 (Bradford D. Boyle)
  5f31d4f5ef32 - Add 18 in more places (Christoph Berg)
Debian ships the same patches in 'pg-auto-failover 2.2-4'.

Project status:
- Not formally archived, but effectively unmaintained
- PostgreSQL wiki lists it as "discontinued" with "maintainer is away"
- Zero commits in 2026; zero maintainer responses to open issues/PRs
- Original author stated (Jan 2025) he is "not much active anymore"
- 125 open issues, 21 unreviewed PRs
- PG 19 beta1 already fails to build (issue #1123)

Spec changes:
- 'ExcludeArch: %%{ix86}' added (upstream dropped 32-bit in v2.2)
- 'Patch0: pg_auto_failover-pg18-support.patch' added (PG 18 compat)
- '%%autosetup' strip level changed from '-p2' to '-p1' (for git patches)
- 'libzstd-devel' added to BuildRequires (PG 18 links against libzstd)

ABI/API: PostgreSQL extension + CLI daemon. Extension is tightly coupled
to PG major version. CLI interface unchanged between 2.1 and 2.2.

Reverse dependencies: only 'pg_auto_failover-docs' (own subpackage).
Retirement would not cascade.

Upgrade safety: very safe for PG 13-17 users.
- Extension schema identical between 2.1 and 2.2
- No CLI or protocol breaking changes
- On-disk state format unchanged
- 32-bit support dropped ('ExcludeArch: %%{ix86}' added)

Mockbuild: passed against PG 18.3 in Rawhide.

Co-Authored-By: Claude AI <noreply@anthropic.com>

---
diff --git a/pg_auto_failover-pg18-support.patch b/pg_auto_failover-pg18-support.patch
new file mode 100644
index 0000000..dfc3ede
--- /dev/null
+++ b/pg_auto_failover-pg18-support.patch
@@ -0,0 +1,231 @@
+From f763a2645e22317bfa295c1c2cdb901adeaca1a9 Mon Sep 17 00:00:00 2001
+From: Christoph Berg <myon@debian.org>
+Date: Mon, 17 Nov 2025 12:46:16 +0100
+Subject: [PATCH] Include PG18 in supported versions
+
+---
+ src/monitor/version_compat.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/monitor/version_compat.h b/src/monitor/version_compat.h
+index 088f53909..82f36abc0 100644
+--- a/src/monitor/version_compat.h
++++ b/src/monitor/version_compat.h
+@@ -14,8 +14,8 @@
+ 
+ #include "postgres.h"
+ 
+-/* we support Postgres versions 10, 11, 12, 13, 14, 15, 16, and 17. */
+-#if (PG_VERSION_NUM < 100000 || PG_VERSION_NUM >= 180000)
++/* we support Postgres versions 10, 11, 12, 13, 14, 15, 16, 17, 18. */
++#if (PG_VERSION_NUM < 100000 || PG_VERSION_NUM >= 190000)
+ #error "Unknown or unsupported postgresql version"
+ #endif
+ 
+From 02e95cab66669de71a415fd85ac49ec61d2a4c1f Mon Sep 17 00:00:00 2001
+From: "Bradford D. Boyle" <bradford.d.boyle@gmail.com>
+Date: Mon, 17 Nov 2025 12:47:43 +0100
+Subject: [PATCH] Fix missing variable declarations
+
+---
+ src/monitor/node_metadata.c    | 1 +
+ src/monitor/pg_auto_failover.c | 2 +-
+ 2 files changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/monitor/node_metadata.c b/src/monitor/node_metadata.c
+index 07748c616..f80d2572b 100644
+--- a/src/monitor/node_metadata.c
++++ b/src/monitor/node_metadata.c
+@@ -19,6 +19,7 @@
+ /* list_qsort is only in Postgres 11 and 12 */
+ #include "version_compat.h"
+ 
++#include "group_state_machine.h"
+ #include "health_check.h"
+ #include "metadata.h"
+ #include "node_metadata.h"
+diff --git a/src/monitor/pg_auto_failover.c b/src/monitor/pg_auto_failover.c
+index c780a8fd4..e7c468627 100644
+--- a/src/monitor/pg_auto_failover.c
++++ b/src/monitor/pg_auto_failover.c
+@@ -35,7 +35,7 @@
+ #include "tcop/utility.h"
+ 
+ 
+-ProcessUtility_hook_type PreviousProcessUtility_hook = NULL;
++static ProcessUtility_hook_type PreviousProcessUtility_hook = NULL;
+ 
+ 
+ #if PG_VERSION_NUM >= 150000
+From efdbb5f5bfdb90f7600c9c0b388d70772b8aab44 Mon Sep 17 00:00:00 2001
+From: "Bradford D. Boyle" <bradford.d.boyle@gmail.com>
+Date: Mon, 17 Nov 2025 12:17:28 +0000
+Subject: [PATCH] Fix included copy of snprintf
+
+Close #1083
+---
+ src/bin/lib/pg/snprintf.c | 20 ++++++--------------
+ 1 file changed, 6 insertions(+), 14 deletions(-)
+
+diff --git a/src/bin/lib/pg/snprintf.c b/src/bin/lib/pg/snprintf.c
+index 5831818f3..94dbfa6b9 100644
+--- a/src/bin/lib/pg/snprintf.c
++++ b/src/bin/lib/pg/snprintf.c
+@@ -550,16 +550,12 @@ dopr(PrintfTarget *target, const char *format, va_list args)
+ 					longflag = 1;
+ 				goto nextch2;
+ 			case 'z':
+-#if SIZEOF_SIZE_T == 8
+-#ifdef HAVE_LONG_INT_64
++#if SIZEOF_SIZE_T == SIZEOF_LONG
+ 				longflag = 1;
+-#elif defined(HAVE_LONG_LONG_INT_64)
++#elif SIZEOF_SIZE_T == SIZEOF_LONG_LONG
+ 				longlongflag = 1;
+ #else
+-#error "Don't know how to print 64bit integers"
+-#endif
+-#else
+-				/* assume size_t is same size as int */
++#error "cannot find integer type of the same size as size_t"
+ #endif
+ 				goto nextch2;
+ 			case 'h':
+@@ -817,16 +813,12 @@ find_arguments(const char *format, va_list args,
+ 					longflag = 1;
+ 				goto nextch1;
+ 			case 'z':
+-#if SIZEOF_SIZE_T == 8
+-#ifdef HAVE_LONG_INT_64
++#if SIZEOF_SIZE_T == SIZEOF_LONG
+ 				longflag = 1;
+-#elif defined(HAVE_LONG_LONG_INT_64)
++#elif SIZEOF_SIZE_T == SIZEOF_LONG_LONG
+ 				longlongflag = 1;
+ #else
+-#error "Don't know how to print 64bit integers"
+-#endif
+-#else
+-				/* assume size_t is same size as int */
++#error "cannot find integer type of the same size as size_t"
+ #endif
+ 				goto nextch1;
+ 			case 'h':
+From 6001bd85a458e0d995d1d64125420744fa3af3ed Mon Sep 17 00:00:00 2001
+From: "Bradford D. Boyle" <bradford.d.boyle@gmail.com>
+Date: Mon, 17 Nov 2025 12:21:00 +0000
+Subject: [PATCH] Add expected output file for upgrade test and psql 18
+
+---
+ src/monitor/expected/upgrade_1.out | 35 ++++++++++++++++++++++++++++++
+ 1 file changed, 35 insertions(+)
+ create mode 100644 src/monitor/expected/upgrade_1.out
+
+diff --git a/src/monitor/expected/upgrade_1.out b/src/monitor/expected/upgrade_1.out
+new file mode 100644
+index 000000000..bc323db63
+--- /dev/null
++++ b/src/monitor/expected/upgrade_1.out
+@@ -0,0 +1,35 @@
++-- Copyright (c) Microsoft Corporation. All rights reserved.
++-- Licensed under the PostgreSQL License.
++CREATE EXTENSION pgautofailover VERSION '1.0';
++\dx pgautofailover
++                      List of installed extensions
++      Name      | Version | Default version | Schema |   Description    
++----------------+---------+-----------------+--------+------------------
++ pgautofailover | 1.0     | 2.2             | public | pg_auto_failover
++(1 row)
++
++ALTER EXTENSION pgautofailover UPDATE TO '1.1';
++\dx pgautofailover
++                      List of installed extensions
++      Name      | Version | Default version | Schema |   Description    
++----------------+---------+-----------------+--------+------------------
++ pgautofailover | 1.1     | 2.2             | public | pg_auto_failover
++(1 row)
++
++ALTER EXTENSION pgautofailover UPDATE TO '1.2';
++\dx pgautofailover
++                      List of installed extensions
++      Name      | Version | Default version | Schema |   Description    
++----------------+---------+-----------------+--------+------------------
++ pgautofailover | 1.2     | 2.2             | public | pg_auto_failover
++(1 row)
++
++ALTER EXTENSION pgautofailover UPDATE TO '1.3';
++\dx pgautofailover
++                      List of installed extensions
++      Name      | Version | Default version | Schema |   Description    
++----------------+---------+-----------------+--------+------------------
++ pgautofailover | 1.3     | 2.2             | public | pg_auto_failover
++(1 row)
++
++DROP EXTENSION pgautofailover;
+From 5f31d4f5ef322b339d67cfd79d773e11f9e30fb0 Mon Sep 17 00:00:00 2001
+From: Christoph Berg <myon@debian.org>
+Date: Mon, 17 Nov 2025 14:01:43 +0100
+Subject: [PATCH] Add 18 in more places
+
+---
+ Makefile         | 5 +++--
+ README.md        | 2 +-
+ docs/install.rst | 2 +-
+ 3 files changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index b83322a00..711a5ca54 100644
+--- a/Makefile
++++ b/Makefile
+@@ -4,7 +4,7 @@
+ .DEFAULT_GOAL := all
+ 
+ # Supported PostgreSQL versions:
+-PGVERSIONS = 13 14 15 16 17
++PGVERSIONS = 13 14 15 16 17 18
+ 
+ # Default version:
+ PGVERSION ?= $(lastword $(PGVERSIONS))
+@@ -16,7 +16,7 @@ CLUSTER_OPTS = ""
+ # XXXX This should be in Makefile.citus only
+ # but requires to clean up dockerfile and make targets related to citus first.
+ # Default Citus Data version
+-CITUSTAG ?= v13.0.1
++CITUSTAG ?= v13.2.0
+ 
+ # TODO should be abs_top_dir ?
+ TOP := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
+@@ -277,6 +277,7 @@ BUILD_ARGS_pg14 = --build-arg PGVERSION=14 --build-arg CITUSTAG=v12.1.5
+ BUILD_ARGS_pg15 = --build-arg PGVERSION=15 --build-arg CITUSTAG=v12.1.5
+ BUILD_ARGS_pg16 = --build-arg PGVERSION=16 --build-arg CITUSTAG=$(CITUSTAG)
+ BUILD_ARGS_pg17 = --build-arg PGVERSION=17 --build-arg CITUSTAG=$(CITUSTAG)
++BUILD_ARGS_pg18 = --build-arg PGVERSION=18 --build-arg CITUSTAG=$(CITUSTAG)
+ 
+ # DOCKER BUILDS
+ 
+diff --git a/README.md b/README.md
+index 96acfdb4b..615a63c69 100644
+--- a/README.md
++++ b/README.md
+@@ -4,7 +4,7 @@
+ 
+ pg_auto_failover is an extension and service for PostgreSQL that monitors
+ and manages automated failover for a Postgres cluster. It is optimized for
+-simplicity and correctness and supports Postgres 13 to 17.
++simplicity and correctness and supports Postgres 13 to 18.
+ 
+ pg_auto_failover supports several Postgres architectures and implements a
+ safe automated failover for your Postgres service. It is possible to get
+diff --git a/docs/install.rst b/docs/install.rst
+index c0db40bac..372550c16 100644
+--- a/docs/install.rst
++++ b/docs/install.rst
+@@ -7,7 +7,7 @@ We provide native system packages for pg_auto_failover on most popular Linux
+ distributions.
+ 
+ Use the steps below to install pg_auto_failover on PostgreSQL 17. At the
+-current time pg_auto_failover is compatible with PostgreSQL 13 to 17.
++current time pg_auto_failover is compatible with PostgreSQL 13 to 18.
+ 
+ Ubuntu or Debian
+ ----------------

diff --git a/pg_auto_failover.spec b/pg_auto_failover.spec
index 06e8df6..23f8120 100644
--- a/pg_auto_failover.spec
+++ b/pg_auto_failover.spec
@@ -1,10 +1,12 @@
+ExcludeArch:    %{ix86}
+
 %bcond_without docs
 %bcond_with llvmjit
 %global precise_version %{?epoch:%epoch:}%version-%release
 
 Name:           pg_auto_failover
-Version:        2.1
-Release:        9%{?dist}
+Version:        2.2
+Release:        1%{?dist}
 Summary:        Postgres extension and service for automated failover and high-availability
 
 # Main project is PostgreSQL
@@ -14,6 +16,14 @@ License:        PostgreSQL AND BSD-3-Clause AND MIT
 URL:            https://github.com/hapostgres/%{name}/
 Source0:        https://github.com/hapostgres/%{name}/archive/refs/tags/v%{version}.tar.gz
 
+# PostgreSQL 18 support, cherry-picked from upstream 'main' branch:
+#   f763a2645e22 - Include PG18 in supported versions (Christoph Berg)
+#   02e95cab6666 - Fix missing variable declarations (Bradford D. Boyle)
+#   efdbb5f5bfdb - Fix included copy of snprintf (Bradford D. Boyle)
+#   6001bd85a458 - Add expected output for upgrade test with psql 18 (Bradford D. Boyle)
+#   5f31d4f5ef32 - Add 18 in more places (Christoph Berg)
+Patch0:         pg_auto_failover-pg18-support.patch
+
 # Requirements for pg_auto_failover code
 # openssl-devel provides necessary cryptography library
 # build process require the same libraries that were used when PostgreSQL was built
@@ -21,7 +31,7 @@ Source0:        https://github.com/hapostgres/%{name}/archive/refs/tags/v%{versi
 BuildRequires:  gcc-c++ openssl-devel zlib-devel libxslt-devel readline-devel pam-devel
 # PostgreSQL libraries and development headers (used by pg_auto_failover)
 BuildRequires:  postgresql-static postgresql-server-devel
-BuildRequires:  lz4-devel
+BuildRequires:  lz4-devel libzstd-devel
 # Requirements for doc and man files
 BuildRequires:  python3-sphinx
 %if %{with docs}
@@ -90,7 +100,7 @@ This packages provides JIT support for pg_auto_failover.
 %endif
 
 %prep
-%autosetup -n %{name}-%{version} -p2
+%autosetup -n %{name}-%{version} -p1
 
 %build
 # Generate additionally man/doc files
@@ -144,6 +154,11 @@ done
 %endif
 
 %changelog
+* Thu Jul 02 2026 Michal Schorm <mschorm@redhat.com> - 2.2-1
+- Rebase to 2.2
+- Cherry-pick PostgreSQL 18 support from upstream 'main' branch
+- Add 'libzstd-devel' to BuildRequires (PG 18 links against libzstd)
+
 * Fri Jun 12 2026 Yaakov Selkowitz <yselkowi@redhat.com> - 2.1-9
 - Rebuilt for openssl 4.0
 

diff --git a/sources b/sources
index 5367bce..27491a5 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (v2.1.tar.gz) = 161e1fcd26344c4160af3fa2290bddd0d5ff3d4b5ee14fbe7bcb10fa6faff098397752a1570c0c79cdcb81cf7826875d63bc8a6a445ec0232304c00615ad527d
+SHA512 (v2.2.tar.gz) = 435a7bacd1faa8f093cbf9a882e8efaf69722e4b2bf2626b06c15969590fa576e5719e413505e73bbf9a54b055b052b9983a0d3874114ea450d2b36ce9ad54f1

                 reply	other threads:[~2026-07-13 17:26 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178396357793.1.4430573920189383173.rpms-pg_auto_failover-294ddf687193@fedoraproject.org \
    --to=mschorm@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox