On docs.ansible.com, you can find the prerequisites for each Red Hat Ansible Tower and Red Hat Ansible Automation Platform version. Specific Red Hat Ansible Tower and Red Hat Ansible Automation Platform version requirements can be viewed by adjusting the versions in the documents section at the top left of the URL above.
Ansible Tower/Controller Version PostgreSQL Version
3.8 (AAP 1.2) PG10
4.0 (AAP 2.0) PG12
4.1 (AAP 2.1) PG12
4.2 (AAP 2.2) PG13
Alternative PostgreSQL versions shouldn’t cause any problems, but the backup/restore playbooks included with Ansible Tower, and Ansible Automation Platform won’t work because of a mismatch in pgutils. Due to this compatibility, we advise using PostgreSQL, the same version as the corresponding AAP versions.