Skip to content

Commit 2a3f060

Browse files
authored
Release v4.1.0 (patroni#3447)
Add release notes, update version
1 parent 3a30b4d commit 2a3f060

File tree

3 files changed

+73
-2
lines changed

3 files changed

+73
-2
lines changed

docs/releases.rst

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,77 @@
33
Release notes
44
=============
55

6+
Version 4.1.0
7+
-------------
8+
9+
Released 2025-09-23
10+
11+
**New features**
12+
13+
- Add support for systemd "notify" unit type (Ronan Dunklau)
14+
15+
Without a notify unit type, it is possible to start Patroni and immediately send it a SIGHUP signal using systemd, effectively killing it before it had time to set up its signal handlers.
16+
17+
- Provide receive and replay LSN/lag information in API and ctl (Polina Bungina)
18+
19+
Patroni REST API ``/cluster`` endpoint and ``patronictl list`` command now provide receive LSN, replay LSN, receive lag, and replay lag information for each replica member.
20+
21+
- Ensure clean demotion to standby cluster (Polina Bungina)
22+
23+
Make sure the introduction of the ``standby_cluster`` section in the dynamic configuration leads to a clean cluster demotion.
24+
25+
- Implement ``patronictl demote-cluster`` and ``promote-cluster`` commands (Polina Bungina)
26+
27+
New commands for cluster demotion and promotion handle both the dynamic configuration editing and checking the result status.
28+
29+
- Implement ``sync_priority`` tag (Polina Bungina)
30+
31+
This parameter controls the priority a member should have during synchronous replica selection when ``synchronous_mode`` is set to ``on``.
32+
33+
- Implement ``--print`` option for ``--validate-config`` (Polina Bungina)
34+
35+
Print out local configuration (including environment configuration overrides) after it has been successfully validated.
36+
37+
- Implement ``kubernetes.bootstrap_labels`` (Polina Bungina)
38+
39+
This feature allows you to define labels that will be assigned to a member pod when in ``initializing new cluster``, ``running custom bootstrap script``, ``starting after custom bootstrap``, or ``creating replica`` state.
40+
41+
- Add configuration option to suppress duplicate heartbeat logs (Michael Morris)
42+
43+
If set to ``true``, successive heartbeat logs that are identical shall not be output.
44+
45+
- Add optional ``cluster_type`` attribute to permanent replication slots (Michael Banck)
46+
47+
This allows you to set whether a particular permanent replication slot should always be created, or just on a primary or standby cluster.
48+
49+
- Make HTTP Server header configurable (David Grierson)
50+
51+
Introduce the ``restapi.server_tokens`` configuration parameter that allows you to restrict information disclosed in the HTTP Server header.
52+
53+
- Implement readiness API checks for replication on replica members (Ants Aasma)
54+
55+
The previous implementation considered replicas ready as soon as PostgreSQL was started. With this change, a replica pod is only considered ready when PostgreSQL is replicating and is not too far behind the leader.
56+
57+
58+
**Improvements**
59+
60+
- Reduce log level of watchdog configuration failure (Ants Aasma)
61+
62+
Show the `Could not activate Linux watchdog device` log line on debug logging level, when the watchdog is configured with ``required`` mode. It was previously shown on info level.
63+
64+
- Take advantage of ``written_lsn`` and ``latest_end_lsn`` from ``pg_stat_wal_receiver`` (Alexander Kukushkin)
65+
66+
``written_lsn``, the actual write LSN, is now preferred over the one returned by ``pg_last_wal_receive_lsn()``, which is in fact the flush LSN. ``latest_end_lsn`` points to WAL flush on the source host. In case of a primary, it allows better calculation of the replay lag, because values stored in DCS are updated only every ``loop_wait`` seconds.
67+
68+
- Avoid interactions with slots created with the ``failover=true`` option (Alexander Kukushkin)
69+
70+
This change is required to make the logical failover slots feature fully functional.
71+
72+
- Add PostgreSQL state to ``/metrics`` REST API endpoint (Ivan Filianin)
73+
74+
PostgreSQL instance state information is now available in the Prometheus format output of the ``/metrics`` REST API endpoint.
75+
76+
677
Version 4.0.7
778
-------------
879

patroni/dcs/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ def is_running(self) -> bool:
302302
"""``True`` if the member :attr:`~Member.state` is :class:`~patroni.postgresql.misc.PostgresqlState.RUNNING`."""
303303
from ..postgresql.misc import PostgresqlState
304304

305-
return self.state == PostgresqlState.RUNNING
305+
return self.state == PostgresqlState.RUNNING.value
306306

307307
@property
308308
def patroni_version(self) -> Optional[Tuple[int, ...]]:

patroni/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
33
:var __version__: the current Patroni version.
44
"""
5-
__version__ = '4.0.7'
5+
__version__ = '4.1.0'

0 commit comments

Comments
 (0)