plugins: postgresql add support for PostgreSQL 17 + improvements#2049
Merged
BareosBot merged 4 commits intobareos:bareos-23from Dec 19, 2024
Conversation
Contributor
|
We shouldn't keep also 47e9f0a |
bruno-at-bareos
previously approved these changes
Dec 12, 2024
Contributor
bruno-at-bareos
left a comment
There was a problem hiding this comment.
With the non removal of parameter commit, this PR is ok.
88e334f to
a306619
Compare
14 tasks
sebsura
commented
Dec 16, 2024
core/src/plugins/filed/python/postgresql/bareos-fd-postgresql.py
Outdated
Show resolved
Hide resolved
bruno-at-bareos
approved these changes
Dec 16, 2024
Contributor
bruno-at-bareos
left a comment
There was a problem hiding this comment.
Thanks for all the good work.
604f4de to
a311dbc
Compare
Our plugin is able to work with PostgreSQL 10. Signed-off-by: Bruno Friedmann <bruno.friedmann@bareos.com> (cherry picked from commit eb99475)
- add support for PostgreSQL version 17, we now use dedicated
function pg_walfile_name_offset to retrieve filename and
check if offset is 0.
- database_local: set checkpoint timeout lower.
- add support for nanosecond integer resolution.
+ use ns in self.last_backup_stop_time as datetime object
are not serializable.
+ use ns for start_backup_time and remove datetime usage
for file comparison.
+ this support allow the plugin to not backup each time the
latest wal file.
- add fix for pg8000 < 1.30 returning a string instead tuple
with pg_walfile_name_offset.
- add a check if ROP last_time_backup is large enough
or convert it to ns (ease plugin version migration).
- remove unused modules datetime dateutil.
- use constant for `NANOSECONDS_PER_SECOND` and
`LAST_BACKUP_TIME_WITH_SECONDS`
- limit if/else block by using global functions current_time_ns()
- add comment about time.time_ns() when to remove it (python 3.7 eol)
- use directly os.stat().st_mtime_ns it has been introduced in
python 3.3 and we don't support python <= 3.6.
- add comment about checkpoint_timeout parameter in setup-local-db.
- use stat_obj instead of stat to avoid keyword redefining.
- improve docstring for __decode_lsn_filename_offset which return
True.
- remove unused lsn parameter from __wait_for_wal_archiving.
- add debug message when LAST_BACKUP_TIME_WITH_SECONDS is hit.
Signed-off-by: Bruno Friedmann <bruno.friedmann@bareos.com>
Co-authored-by: Sebastian Sura <124262655+sebsura@users.noreply.github.com>
(cherry picked from commit db6c78f)
This comma turns the expression into a tuple instead of a simple string.
a0dd477 to
4ecb8b5
Compare
This file contains hidden or 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
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.
Backport of PR #2004 to bareos-23
Changes:
Checklist for the reviewer of the PR (will be processed by the Bareos team)
Make sure you check/merge the PR using
devtools/pr-toolto have some simple automated checks run and a proper changelog record added.General
Source code quality (if there were changes to the original PR)
Backport quality