forked from patroni/patroni
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Syncing from upstream patroni/patroni (ci/unpin-psycopg) #482
Merged
bt-admin
merged 19 commits into
brain-tec:ci/unpin-psycopg
from
patroni:ci/unpin-psycopg
Jan 18, 2025
Merged
Syncing from upstream patroni/patroni (ci/unpin-psycopg) #482
bt-admin
merged 19 commits into
brain-tec:ci/unpin-psycopg
from
patroni:ci/unpin-psycopg
Jan 18, 2025
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…3192) From the actual code, in patroni/postgresql/config.py::ConfigHandler.CMDLINE_OPTIONS, the previous defaults were wrong.
python-consul is unmaintained for a long time and py-consul is an official replacement. However, we still keep backward compatibility with python-consul. Close: #3189
Additionally run on_role_change callback in post_recover() for a primary that failed to start after a crash to increase chances the callback is executed, even if the further start as a replica fails --------- Co-authored-by: Alexander Kukushkin <[email protected]>
Found via `codespell -H` and `typos --hidden --format brief`
It was broken in #3191
They started showing deprecation warning when importing ALL and FRAME constants.
* Release v4.0.4 - Increase version - Use latest pyright - Add RNs
When in automatic mode we probably don't need to warn user about failure to set up watchdog. This is the common case and makes many users think that this feature is somehow necessary to run Patroni safely. For most users it is completely fine to run without and it makes sense to reduce their log spam.
…#3229) This allows to set whether a particular permanent replication slot should always be created ('cluster_type=any', the default), or just on a primary ('cluster_type=primary') or standby ('cluster_type=standby') cluster, respectively.
When doing `patronictl restart <clustername> --pending`, the confirmation lists all members, regardless if their restart is really pending: ``` > patronictl restart pgcluster --pending + Cluster: pgcluster (7436691039717365672) ----+----+-----------+-----------------+---------------------------------+ | Member | Host | Role | State | TL | Lag in MB | Pending restart | Pending restart reason | +--------+----------+--------------+-----------+----+-----------+-----------------+---------------------------------+ | win1 | 10.0.0.2 | Sync Standby | streaming | 8 | 0 | * | hba_file: [hidden - too long] | | | | | | | | | ident_file: [hidden - too long] | | | | | | | | | max_connections: 201->202 | +--------+----------+--------------+-----------+----+-----------+-----------------+---------------------------------+ | win2 | 10.0.0.3 | Leader | running | 8 | | * | hba_file: [hidden - too long] | | | | | | | | | ident_file: [hidden - too long] | | | | | | | | | max_connections: 201->202 | +--------+----------+--------------+-----------+----+-----------+-----------------+---------------------------------+ | win3 | 10.0.0.4 | Replica | streaming | 8 | 0 | | | +--------+----------+--------------+-----------+----+-----------+-----------------+---------------------------------+ When should the restart take place (e.g. 2024-11-27T08:27) [now]: Restart if the PostgreSQL version is less than provided (e.g. 9.5.2) []: Are you sure you want to restart members win1, win2, win3? [y/N]: ``` When we proceed with the restart despite the scary message mentioning all members, not just the ones needing a restart, there will be an error message stating the node not to be restarted was indeed not restarted: ``` Are you sure you want to restart members win1, win2, win3? [y/N]: y Restart if the PostgreSQL version is less than provided (e.g. 9.5.2) []: Success: restart on member win1 Success: restart on member win2 Failed: restart for member win3, status code=503, (restart conditions are not satisfied) ``` The misleading confirmation message can also be seen when using the `--any` flag. The current PR is fixing this. However, we do not apply filtering in case of scheduled pending restart, because the condition must be evaluated at the scheduled time.
Patroni could be doing replica bootstrap and we don't want want pg_basebackup/wal-g/pgBackRest/barman or similar keep running. Besides that, remove data directory on replica bootstrap failure if configuration allows. Close #3224
* Compatibility with python-json-logger>=3.1 After refactoring the old API is still working, but producing warnings and pyright also fails. Besides that improve coverage of watchdog/base.py and ctl.py * Stick to ubuntu 22.04 * Please pyright
Test if config (file) parsed with yaml_load() contains a valid Mapping object, otherwise Patroni throws an explicit exception. It also makes the Patroni output more explicit when using that kind of "invalid" configuration. ``` console $ touch /tmp/patroni.yaml $ patroni --validate-config /tmp/patroni.yaml /tmp/patroni.yaml does not contain a dict invalid config file /tmp/patroni.yaml ``` reportUnnecessaryIsInstance is explicitly ignored since we can't determine what yaml_safeload can bring from a YAML config (list, dict,...).
This reverts commit 51de1d9.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
bt_gitbot