KNOWLEDGE BASE

Error "error: Current Transaction Is Aborted, Commands Ignored Until End Of Transaction Block; Error While Executing The Query" when connecting or interacting with Postgresql Data Source.


Published: 19 Dec 2019
Last Modified Date: 15 Feb 2021

Issue

When attempting to connect to or refresh a PostgreSQL data source on Tableau Online, or when dragging any measure or dimension to the columns/Rows shelf after the connection is made, the following error may occur:

An error occurred while communicating with PostgreSQL
Bad Connection: Tableau could not connect to the data source
ERROR: current transaction is aborted, commands ignored until end of transaction block; Error while executing the query

Environment

  • Tableau Online
  • Tableau Desktop
  • PostgreSQL Database 12.1

Resolution

1. Workarounds for scenario 1: When attempting to connect to or refresh a PostgreSQL data source on Tableau Online (to track the status of this issue, see Issue ID 947669 on the Known Issues page). This has been resolved with the release of the PostgreSQL JDBC driver to Tableau Online. 

2. Workaround for scenario 2: when dragging any measure or dimension to the columns/Rows shelf after the connection to PostgreSQL is made.
  • Uninstall the current version of the PostgreSQL driver installed on the machine.
  • Install the latest version of PostgreSQL driver, version 12.1. Note: the latest Postgres driver can be  found here: https://www.postgresql.org/ftp/odbc/versions/msi/

Cause

This issue is caused by the PostgreSQL driver.  Some PostgreSQL driver versions do not properly handle the cancel request. Because of this, It believes the transaction is still available and attempts to run queries off of it, which causes things to break.
 

Additional Information

Note: Tableau Online has updated all Pods to include the new PostgreSQL JDBC driver for issues with PostgreSQL 12 as of 2/10/21.  
Did this article resolve the issue?