To find the appropriate database user credentials for CICS transactions or batch jobs, the PostgreSQL XA switch module executes a SET SESSION AUTHORIZATION statement. For this call to work properly, your xa_open string user must be a superuser. This enables the xa_open user ID to impersonate the appropriate database user ID.
The following is provided as a simple example. Your security and database environment might dictate a different implementation. Please review the PostgreSQL documentation on this and other related topics before implementing your solution:
CREATE ROLE XAOPENUSER SUPERUSER LOGIN PASSWORD 'xxxxxx'
CREATE ROLE FRITZ LOGIN PASSWORD 'xxxxxx'
CREATE SCHEMA FRITZ AUTHORIZATION FRITZ