diff --git a/roles/postgresql_server/templates/postgresql.conf b/roles/postgresql_server/templates/postgresql.conf index e8c058b99a..5f9314c62e 100644 --- a/roles/postgresql_server/templates/postgresql.conf +++ b/roles/postgresql_server/templates/postgresql.conf @@ -1,3 +1,10 @@ +{% if ansible_hostname.startswith("db-fas01") %} +# This enabled pg-8 compatibility for bytea fields +# Fixes errors with sqlalchemy with binary data when app is on RHEL6 and server is PG9 +# Reference: https://bitbucket.org/zzzeek/sqlalchemy/issue/2016/pickletype-does-not-work-with-postgresql +bytea_output = 'escape' +{% endif %} + # ----------------------------- # PostgreSQL configuration file # -----------------------------