Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from patroni:master #11

Open
wants to merge 72 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
3c07410
Use trusted publishers for pypi (#3095)
hughcapet Jul 1, 2024
a4a6dc0
Fix plain Postgres synchronous replication mode (#3094)
barthisrael Jul 2, 2024
f00826d
Make ``postgresql.parameter`` documentation more clear (#3092)
RMTT Jul 10, 2024
622d41c
Handle logical slots invalidation on a standby (#3097)
hughcapet Jul 10, 2024
c687838
Fix race condition with logical slot advance and copy (#3098)
CyberDem0n Jul 10, 2024
fbbd32a
Release v3.3.2 (#3099)
hughcapet Jul 11, 2024
a5796a0
Finish refactoring of the Status class (#3103)
CyberDem0n Jul 16, 2024
b8b5518
Get rid of SLOT_ADVANCE_AVAILABLE_VERSION in `dcs/__init__.py` (#3105)
CyberDem0n Jul 17, 2024
b1d442e
Advance permanent slots for cascading nodes while in failsafe (#3100)
CyberDem0n Jul 17, 2024
c633923
Refactor update_leader() method (#3107)
CyberDem0n Jul 18, 2024
4456e26
Patroni doesn't forece wal_log_hints anymore (#3109)
CyberDem0n Jul 22, 2024
cd3f52b
Don't let the current node be chosen as synchronous (#3112)
CyberDem0n Jul 29, 2024
ab9faf9
Ignore restapi.allowlist_include_members for POST /failsafe (#3113)
CyberDem0n Jul 30, 2024
5eb431b
Compatibility with v17 beta3 (#3120)
CyberDem0n Aug 12, 2024
b458bd9
Use get_parameter_status() method instead of Connection.info.paramete…
CyberDem0n Aug 12, 2024
56dba93
Implement support of `log.mode`. (#3122)
CyberDem0n Aug 13, 2024
384705a
Quorum based failover (#2668)
CyberDem0n Aug 13, 2024
0fa4150
Register Citus secondaries in pg_dist_node (#2755)
CyberDem0n Aug 13, 2024
fc5a8ed
Add synchronous_node_count to dynamic conf doc (#3124)
hughcapet Aug 13, 2024
c931da1
Remove user creation (#2894)
GuanqunYang193 Aug 13, 2024
93eb4ed
Reformat imports with isort (#3123)
CyberDem0n Aug 13, 2024
a03dba0
Fix timestamp order in postmaster check log (#3128)
waynerv Aug 15, 2024
7659ccd
Fix request URL in failsafe handling logs (#3126)
waynerv Aug 15, 2024
31cf951
Remove patronictl failover --leader option (#3129)
hughcapet Aug 16, 2024
8c5ab4c
Improve GUCs validation (#3130)
hughcapet Aug 23, 2024
6d65aa3
Configurable retention of members replication slots (#3108)
CyberDem0n Aug 23, 2024
8cdb0c2
Follow up on #2755 (#3137)
CyberDem0n Aug 27, 2024
835d939
Add line with localhost to pgpass when unix sockets are detected (#3139)
CyberDem0n Aug 27, 2024
b470ade
Change master->primary, take two (#3127)
CyberDem0n Aug 28, 2024
c9322df
Added a new flag to ignore unsuccessful bind (#3138)
sahilnap06 Aug 29, 2024
3ecdf01
Release v4.0.0 (#3141)
hughcapet Aug 29, 2024
db82a83
Fix bug in member slots retention feature (#3142)
CyberDem0n Aug 30, 2024
2f80017
Handle exception from iterdir while discovering static files (#3152)
CyberDem0n Sep 9, 2024
d5d6a51
Make sure inactive hot physical replication slots don't hold xmin (#3…
CyberDem0n Sep 10, 2024
57ed40f
Fix unhandled DCSError during startup phase (#3149)
waynerv Sep 12, 2024
66f98c8
Use None instead of empty string in socket.getaddrinfo() port (#3160)
CyberDem0n Sep 12, 2024
b3ae865
Explicitly include CMDLINE_OPTIONS GUCs when querying pg_settings (#3…
CyberDem0n Sep 12, 2024
4c951a2
Ensure sphinx doc attributes are available before trying to access th…
mbanck-ntap Sep 12, 2024
74a72e4
Fix bug in quote_standby_name() function (#3161)
CyberDem0n Sep 13, 2024
94a592d
Fix keepalive connection out of the range issue (#3089) (#3158)
hadizamani021 Sep 13, 2024
416a0f7
Use names with "unusual" symbols in behave tests (#3162)
CyberDem0n Sep 16, 2024
bfa9b0c
Fix flake8 for tests directory (#3168)
CyberDem0n Sep 16, 2024
87cb748
Fix timeline metric None value (#3165)
UTXOnly Sep 17, 2024
d7e172c
Don't retains member slots on nodes with nofailover tag (#3169)
CyberDem0n Sep 17, 2024
78a46b9
Follow up on #3148 (#3167)
CyberDem0n Sep 17, 2024
6b68503
Release v4.0.2 (#3166)
hughcapet Sep 17, 2024
e91e6b5
Add support of sslnegotiation client-side connection option (#3173)
CyberDem0n Sep 27, 2024
8e46086
Recheck annotations when reading leader object on 409 (#3174)
CyberDem0n Oct 2, 2024
877acf2
Disable pgaudit when creating users to not expose password (#3175)
kviset Oct 9, 2024
58ee52b
Docs compatibility with sphinx 8 (#3177)
hughcapet Oct 10, 2024
74c0acf
Fix issue with mixed setups: primary on pre-v4 and replicas on v4+ (#…
CyberDem0n Oct 16, 2024
ff27870
Partially revert patroni@8c5ab4c (#3180)
hughcapet Oct 16, 2024
ba970d8
Temporary pin psycopg2-binary version for macOS (#3186)
hughcapet Oct 18, 2024
4853b3b
Pyright 1.1.385 (#3182)
CyberDem0n Oct 18, 2024
75ff8b3
Add documentation for sslnegotiation option (#3185)
hughcapet Oct 18, 2024
969d7ec
Increase version, add RNs (#3188)
hughcapet Oct 18, 2024
72be036
Fix defaults 'max_wal_senders' and 'max_replication_slots' in docs (#…
dlax Oct 25, 2024
e8a8bfe
Switch to py-consul (#3191)
CyberDem0n Oct 28, 2024
7dcb9b9
Run on_role_change cb after a failed primary recovery (#3198)
hughcapet Oct 31, 2024
177101a
Fixes outdated link to Zalando's tech blog on Patroni (#3201)
bocytko Nov 5, 2024
e1faa38
Cache DCS instances to avoid thread leak in `patronictl list -W` (#3205)
CyberDem0n Nov 11, 2024
efba02f
Make sure only supported parameters are written to connection string …
CyberDem0n Nov 12, 2024
4ce0f99
Fix typos (#3204)
kianmeng Nov 12, 2024
3f00b7a
Restore compatibility with python-consul2 (#3215)
CyberDem0n Nov 19, 2024
19f75b4
Compatibility with prettytable>=3.12.0 (#3217)
CyberDem0n Nov 19, 2024
a903438
Compatibility with ydiff==1.4.2 (#3216)
CyberDem0n Nov 19, 2024
fb0fcc8
Release v4.0.4 (#3221)
hughcapet Nov 22, 2024
9d1609e
Reduce log level of watchdog configuration failure (#3231)
ants Dec 10, 2024
578dc39
Add optional 'cluster_type' attribute to permanent replication slots.…
mbanck-ntap Dec 10, 2024
46e20ed
Show only the members to be restarted upon restart confirmation (#3226)
avandras Dec 10, 2024
39f5de2
Implement sync_priority tag (#3223)
hughcapet Dec 10, 2024
e73f204
Cancel long-running jobs on Patroni stop (#3232)
CyberDem0n Dec 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/install_deps.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ def install_requirements(what):
requirements += ['coverage']
# try to split tests between psycopg2 and psycopg3
requirements += ['psycopg[binary]'] if sys.version_info >= (3, 8, 0) and\
(sys.platform != 'darwin' or what == 'etcd3') else ['psycopg2-binary']
(sys.platform != 'darwin' or what == 'etcd3') else ['psycopg2-binary==2.9.9'
if sys.platform == 'darwin' else 'psycopg2-binary']
for r in read('requirements.txt').split('\n'):
r = r.strip()
if r != '':
Expand All @@ -46,7 +47,7 @@ def install_packages(what):
packages['exhibitor'] = packages['zookeeper']
packages = packages.get(what, [])
ver = versions.get(what)
if float(ver) >= 15:
if 15 <= float(ver) < 17:
packages += ['postgresql-{0}-citus-12.1'.format(ver)]
subprocess.call(['sudo', 'apt-get', 'update', '-y'])
return subprocess.call(['sudo', 'apt-get', 'install', '-y', 'postgresql-' + ver, 'expect-dev'] + packages)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mapping.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
versions = {'etcd': '9.6', 'etcd3': '16', 'consul': '13', 'exhibitor': '12', 'raft': '14', 'kubernetes': '15'}
versions = {'etcd': '9.6', 'etcd3': '16', 'consul': '17', 'exhibitor': '12', 'raft': '14', 'kubernetes': '15'}
9 changes: 4 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ jobs:
build-n-publish:
name: Build and publish Patroni distributions to PyPI and TestPyPI
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v4

Expand All @@ -32,13 +34,10 @@ jobs:

- name: Publish distribution to Test PyPI
if: github.event_name == 'push'
uses: pypa/gh-action-pypi-publish@v1.8.14
uses: pypa/gh-action-pypi-publish@v1.9.0
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/

- name: Publish distribution to PyPI
if: github.event_name == 'release'
uses: pypa/[email protected]
with:
password: ${{ secrets.PYPI_API_TOKEN }}
uses: pypa/[email protected]
36 changes: 35 additions & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,24 @@ jobs:

- uses: jakebailey/pyright-action@v2
with:
version: 1.1.367
version: 1.1.389

ydiff:
name: Test compatibility with the latest version of ydiff
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install dependencies
run: python .github/workflows/install_deps.py
- name: Update ydiff
run: python -m pip install -U ydiff
- name: Run tests
run: python -m pytest tests/test_ctl.py -v

docs:
runs-on: ubuntu-latest
Expand All @@ -211,3 +228,20 @@ jobs:

- name: Generate documentation
run: tox -m docs

isort:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: 3.12
cache: pip

- name: isort
uses: isort/isort-action@master
with:
requirementsFiles: "requirements.txt requirements.dev.txt requirements.docs.txt"
sort-paths: "patroni tests features setup.py"
2 changes: 1 addition & 1 deletion Dockerfile.citus
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ RUN sed -i 's/env python/&3/' /patroni*.py \
&& sed -i "s|^\( data_dir: \).*|\1$PGDATA|" postgres?.yml \
&& sed -i "s|^#\( bin_dir: \).*|\1$PGBIN|" postgres?.yml \
&& sed -i 's/^ - encoding: UTF8/ - locale: en_US.UTF-8\n&/' postgres?.yml \
&& sed -i 's/^scope:/log:\n loggers:\n patroni.postgresql.citus: DEBUG\n#&/' postgres?.yml \
&& sed -i 's/^scope:/log:\n loggers:\n patroni.postgresql.mpp.citus: DEBUG\n#&/' postgres?.yml \
&& sed -i 's/^\(name\|etcd\| host\| authentication\| connect_address\| parameters\):/#&/' postgres?.yml \
&& sed -i 's/^ \(replication\|superuser\|rewind\|unix_socket_directories\|\(\( \)\{0,1\}\(username\|password\)\)\):/#&/' postgres?.yml \
&& sed -i 's/^postgresql:/&\n basebackup:\n checkpoint: fast/' postgres?.yml \
Expand Down
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Patroni is a template for high availability (HA) PostgreSQL solutions using Pyth

We call Patroni a "template" because it is far from being a one-size-fits-all or plug-and-play replication system. It will have its own caveats. Use wisely.

Currently supported PostgreSQL versions: 9.3 to 16.
Currently supported PostgreSQL versions: 9.3 to 17.

**Note to Citus users**: Starting from 3.0 Patroni nicely integrates with the `Citus <https://github.com/citusdata/citus>`__ database extension to Postgres. Please check the `Citus support page <https://github.com/patroni/patroni/blob/master/docs/citus.rst>`__ in the Patroni documentation for more info about how to use Patroni high availability together with a Citus distributed cluster.

Expand All @@ -33,7 +33,7 @@ For additional background info, see:

* `Elephants on Automatic: HA Clustered PostgreSQL with Helm <https://www.youtube.com/watch?v=CftcVhFMGSY>`_, talk by Josh Berkus and Oleksii Kliukin at KubeCon Berlin 2017
* `PostgreSQL HA with Kubernetes and Patroni <https://www.youtube.com/watch?v=iruaCgeG7qs>`__, talk by Josh Berkus at KubeCon 2016 (video)
* `Feb. 2016 Zalando Tech blog post <https://tech.zalando.de/blog/zalandos-patroni-a-template-for-high-availability-postgresql/>`__
* `Feb. 2016 Zalando Tech blog post <https://engineering.zalando.com/posts/2016/02/zalandos-patroni-a-template-for-high-availability-postgresql.html>`__

==================
Development Status
Expand Down Expand Up @@ -91,7 +91,7 @@ where dependencies can be either empty, or consist of one or more of the followi
etcd or etcd3
`python-etcd` module in order to use Etcd as DCS
consul
`python-consul` module in order to use Consul as DCS
`py-consul` module in order to use Consul as DCS
zookeeper
`kazoo` module in order to use Zookeeper as DCS
exhibitor
Expand Down
Loading