Skip to content

Add postgresql option target_session_attrs#1847

Merged
fosterseth merged 1 commit intoansible:develfrom
plusserver:fix_missing_pg_target_session_attr
May 15, 2024
Merged

Add postgresql option target_session_attrs#1847
fosterseth merged 1 commit intoansible:develfrom
plusserver:fix_missing_pg_target_session_attr

Conversation

@larsux
Copy link
Copy Markdown
Contributor

@larsux larsux commented Apr 30, 2024

SUMMARY

Added support for the postgresql option 'target_session_attrs'. This is required if you have a postgreSQL database cluster and want to ensure that AWX only connects to the primary database node with write permissions.

This change is all the more necessary as this option cannot be passed in custom.py as the order in which the configuration files are loaded is not stable. It is therefor not possible to guarantee, that the DATABASES dictionary is already defined or will be overwritten later.

PR fixes #1792

ISSUE TYPE
  • New or Enhanced Feature
ADDITIONAL INFORMATION

The following has been added:

  • add target_session_attrs to the database credentials template in the ansible installer role
  • add target_session_attrs to the postgresql config template in the helm chart

I've successfully tested that change with molecule/kind and in our own K8s Cluster with postgreSQL-Cluster database backend.

Signed-off-by: Lars Wildemann <lars.wildemann@plusserver.com>
@fosterseth fosterseth enabled auto-merge (squash) May 15, 2024 18:36
@rooftopcellist
Copy link
Copy Markdown
Member

Thanks for the contribution @larsux

@fosterseth fosterseth merged commit e98c913 into ansible:devel May 15, 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.

Support for external PostgreSQL cluster client-side High Availability

3 participants