-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[RDBMS] az postgres flexible-server update/fabric-mirroring: Allow high availability enabled servers to start fabric mirroring if PG version 17+
#32468
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -470,8 +470,8 @@ def flexible_server_update_custom_func(cmd, client, instance, | |||||||||
| if high_availability.lower() != "disabled" and standby_availability_zone: | ||||||||||
| high_availability_param.standby_availability_zone = standby_availability_zone | ||||||||||
|
|
||||||||||
| # PG 11 and 12 will never receive fabric mirroring support. Skip this check for servers of these versions | ||||||||||
| if high_availability.lower() != "disabled" and str(instance.version) not in ["11", "12"]: | ||||||||||
| # PG 11 and 12 will never receive fabric mirroring support. Ignite 2025 Fabric mirroring supported on 17. Skip this check for servers of these versions | ||||||||||
| if high_availability.lower() != "disabled" and str(instance.version) not in ["11", "12", "17", "18"]: | ||||||||||
|
Comment on lines
+473
to
+474
|
||||||||||
| # PG 11 and 12 will never receive fabric mirroring support. Ignite 2025 Fabric mirroring supported on 17. Skip this check for servers of these versions | |
| if high_availability.lower() != "disabled" and str(instance.version) not in ["11", "12", "17", "18"]: | |
| # PG 11 and 12 will never receive fabric mirroring support. Ignite 2025: Fabric mirroring supported with HA on 17+ | |
| if high_availability.lower() != "disabled" and str(instance.version) in ["13", "14", "15", "16"]: |
Copilot
AI
Nov 26, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logic is incorrect. The condition server.version not in ["17"] means:
- For version 17: condition is
False, error is NOT raised ✓ (correct) - For versions 11-16: condition is
True, error IS raised ✗ (incorrect for intended behavior)
This prevents fabric mirroring on all non-17 versions with HA, including future versions like 18, 19, etc.
The correct approach should check if the version is less than 17:
if server.high_availability.mode != "Disabled" and int(server.version) < 17:Alternatively, if you want to be explicit about supported versions:
if server.high_availability.mode != "Disabled" and server.version in ["11", "12", "13", "14", "15", "16"]:| if server.high_availability.mode != "Disabled" and server.version not in ["17", "18"]: | |
| if server.high_availability.mode != "Disabled" and int(server.version) < 17: |
Copilot
AI
Nov 26, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same logic error as in flexible_server_fabric_mirroring_start. The condition server.version not in ["17"] will block fabric mirroring stop operations for all versions except 17 when HA is enabled, including future versions.
Use the same fix as recommended for line 1588:
if server.high_availability.mode != "Disabled" and int(server.version) < 17:| if server.high_availability.mode != "Disabled" and server.version not in ["17", "18"]: | |
| if server.high_availability.mode != "Disabled" and int(server.version) < 17: |
Copilot
AI
Nov 26, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same logic error as in the other fabric mirroring functions. The condition server.version not in ["17"] will incorrectly block database updates for all versions except 17 when HA is enabled.
Use the same fix as recommended for lines 1588 and 1618:
if server.high_availability.mode != "Disabled" and int(server.version) < 17:| if server.high_availability.mode != "Disabled" and server.version not in ["17", "18"]: | |
| if server.high_availability.mode != "Disabled" and int(server.version) < 17: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment is misleading. It states "Ignite 2025 Fabric mirroring supported on 17" but the logic skips the check for version 17, which is the opposite of what the comment suggests. The comment should clarify that the check is being skipped for versions where fabric mirroring + HA is supported (17+).