Skip to content

plugins: postgresql add support for PostgreSQL 17 + improvements#2049

Merged
BareosBot merged 4 commits intobareos:bareos-23from
sebsura:backport/bareos-23/fix-issue#1982-postgresql-plugin-with-pg17
Dec 19, 2024
Merged

plugins: postgresql add support for PostgreSQL 17 + improvements#2049
BareosBot merged 4 commits intobareos:bareos-23from
sebsura:backport/bareos-23/fix-issue#1982-postgresql-plugin-with-pg17

Conversation

@sebsura
Copy link
Contributor

@sebsura sebsura commented Dec 4, 2024

Backport of PR #2004 to bareos-23

Changes:

  • removed adr, as those were introduced in 24.
  • don't apply removal of 24 obsolete configuration parameters
  • apply backport of 0a0e99a

Checklist for the reviewer of the PR (will be processed by the Bareos team)

Make sure you check/merge the PR using devtools/pr-tool to have some simple automated checks run and a proper changelog record added.

General
  • Correct milestone is set
Source code quality (if there were changes to the original PR)
  • Source code changes are understandable
  • Variable and function names are meaningful
  • Code comments are correct (logically and spelling)
  • Required documentation changes are present and part of the PR

Backport quality

@bruno-at-bareos
Copy link
Contributor

We shouldn't keep also 47e9f0a

@bruno-at-bareos bruno-at-bareos modified the milestones: 23.1.1, 23.1.2 Dec 12, 2024
Copy link
Contributor

@bruno-at-bareos bruno-at-bareos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the non removal of parameter commit, this PR is ok.

@bruno-at-bareos bruno-at-bareos force-pushed the backport/bareos-23/fix-issue#1982-postgresql-plugin-with-pg17 branch from 88e334f to a306619 Compare December 12, 2024 09:49
@sebsura sebsura dismissed bruno-at-bareos’s stale review December 16, 2024 06:01

some error turned up

Copy link
Contributor Author

@sebsura sebsura left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As fixed in #2066

Copy link
Contributor

@bruno-at-bareos bruno-at-bareos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for all the good work.

@bruno-at-bareos bruno-at-bareos force-pushed the backport/bareos-23/fix-issue#1982-postgresql-plugin-with-pg17 branch from 604f4de to a311dbc Compare December 16, 2024 10:42
bruno-at-bareos and others added 4 commits December 19, 2024 08:18
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.
@BareosBot BareosBot force-pushed the backport/bareos-23/fix-issue#1982-postgresql-plugin-with-pg17 branch from a0dd477 to 4ecb8b5 Compare December 19, 2024 08:18
@BareosBot BareosBot merged commit f325896 into bareos:bareos-23 Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants