Skip to content

Commit

Permalink
Add 17 to supported Postgres versions
Browse files Browse the repository at this point in the history
Refactor postgres server package workaround for pg_receivewal binary
for EPAS, pgextended and edbpge since it is now included in client
package for version 17.

Raise error for repmgr use in configuration command since no packages
are built for any Postgres 17 flavour.

Update list of TPA-supported Postgres versions to drop 10 and add 17,
updated documentation to reflect these changes.

Update BDR version selection to include Postgres version 17.

Update Postgres version list for Single Integration Test to remove
10 as it is unsupported, add 16 and 17 and default to use 16.
  • Loading branch information
jdnevin authored and JonathanRenon-EDB committed Nov 13, 2024
1 parent 36eed27 commit ddadd60
Show file tree
Hide file tree
Showing 10 changed files with 50 additions and 14 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/single_integration_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,16 @@ on:
tpa_postgres_version:
description: "Postgres version"
required: true
default: "14"
default: "16"
type: choice
options:
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
tpa_failover_manager:
description: "Failover-manager (for M1 only)"
type: choice
Expand Down
2 changes: 1 addition & 1 deletion architectures/lib/OPTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ You can get an EDB token from enterprisedb.com/repos.
#### Postgres flavour and version

TPA supports PostgreSQL, EDB Postgres Extended, and EDB Postgres
Advanced Server (EPAS) versions 11 through 15.
Advanced Server (EPAS) versions 11 through 17.

You must specify both the flavour (or distribution) and major version of
Postgres to install, for example:
Expand Down
2 changes: 1 addition & 1 deletion docs/src/tpaexec-configure.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ details.
#### Postgres flavour and version

TPA supports PostgreSQL, EDB Postgres Extended, and EDB Postgres
Advanced Server (EPAS) versions 11 through 16.
Advanced Server (EPAS) versions 11 through 17.

You must specify both the flavour (or distribution) and major version of
Postgres to install, for example:
Expand Down
2 changes: 1 addition & 1 deletion lib/tpaexec/architecture.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ def add_options(self, p):
# required, just check that we have the value in validate_arguments.

supported_flavours = ["postgresql", "pgextended", "edbpge", "epas"]
supported_versions = ["10", "11", "12", "13", "14", "15", "16"]
supported_versions = ["11", "12", "13", "14", "15", "16", "17"]

class FlavourAndMaybeVersionAction(argparse.Action):
"""Takes an option such as `--epas` or `--postgresql 15` and stores
Expand Down
1 change: 1 addition & 0 deletions lib/tpaexec/architectures/bdr.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ def update_cluster_vars(self, cluster_vars):
"14": "5" if arch == "PGD-Always-ON" else "4",
"15": "5" if arch == "PGD-Always-ON" else "4",
"16": "5" if arch == "PGD-Always-ON" else "4",
"17": "5" if arch == "PGD-Always-ON" else "4",
None: "5" if arch == "PGD-Always-ON" else "4",
}

Expand Down
1 change: 1 addition & 0 deletions lib/tpaexec/architectures/bdr_always_on.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ def supported_versions(self) -> List[Tuple[str, str]]:
("14", "5"),
("15", "5"),
("16", "5"),
("17", "5")
]

def add_architecture_options(self, p, g):
Expand Down
7 changes: 7 additions & 0 deletions lib/tpaexec/architectures/m1.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,13 @@ def validate_arguments(self, args):
raise ArchitectureError(
f"TPA does not support repmgr with {args.get('postgres_flavour')}"
)
if(
args.get("failover_manager") == "repmgr"
and args.get("postgres_version") >= "17"
):
raise ArchitectureError(
f"TPA does not support repmgr for {args.get('postgres_flavour')} 17"
)
if args.get("failover_manager") != "efm" and args.get("efm_bind_by_hostname"):
raise ArchitectureError(
f"--efm-bind-by-hostname can't be used with {args.get('failover_manager')}"
Expand Down
1 change: 1 addition & 0 deletions lib/tpaexec/architectures/pgd_always_on.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ def supported_versions(self) -> List[Tuple[str, str]]:
("14", "5"),
("15", "5"),
("16", "5"),
("17", "5")
]

def add_architecture_options(self, p, g):
Expand Down
22 changes: 22 additions & 0 deletions release_notes/TPA-803.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
- summary: Support PostgreSQL, EDB Postgres Extended, and EDB Postgres Advanced Server 17
description: |
Clusters can be configured to use PostgreSQL, EDB Postgres Extended and
EDB Postgres Advanced Server version 17.
Barman no longer needs to install the postgres server package to get
the `pg_receivewal` binary when using EDB Postgres Advanced Server 17 or
EDB Postgres Extended 17 since the binary has been added to the client
package for these versions.
Raise an architecture error when a cluster is configured with `repmgr`
as the failover_manager as it is not available for Postgres 17.
Updated documentation to reflect supported versions.
# Possible types: notable_change, minor_change, bugfix or breaking_change
type: notable_change
# At least one between jira_tickets or support_tickets must be defined. You
# can define both if you want
# You must have at least one list item in each *_tickets section that is
# defined
jira_tickets:
- TPA-803
21 changes: 12 additions & 9 deletions roles/barman/pkg/tasks/list-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
# We expect pg_receivewal to be installed, but the EPAS client rpm does
# not include it (although the deb package does), so we have to install
# the server package as a temporary workaround. 2ndQPostgres 13 and above
# and edb-postgresextended 13 and above also need the same workaround.
# and edb-postgresextended versions 13-16 also need the same workaround.
# starting with version 17 both epas and edb-postgresextended client package include
# the pg_receivewal binary, so the workaround is not necessary.

- include_role: name=pkg/add_to_list
vars:
Expand All @@ -32,11 +34,12 @@
redhat_workaround_packages
|packages_for(ansible_os_family, postgres_package_version)
}}"
when:
ansible_os_family in ('RedHat', 'SUSE')
and (
(postgres_flavour == 'epas')
or
(postgres_flavour in ['pgextended', 'edbpge']
and postgres_version is version('13', '>='))
)
when:
- postgres_version is version('17', '<')
- ansible_os_family in ('RedHat', 'SUSE')
- (postgres_flavour == 'epas'
or (
postgres_flavour in ['pgextended', 'edbpge']
and postgres_version is version('13', '>=')
)
)

0 comments on commit ddadd60

Please sign in to comment.