KNOWLEDGE BASE

Tableau Postgres Connector Throws "Error 0x4F2352E8" When VARCHAR Columns or Spatial Types Exceed Memory Limits


Published: 19 Mar 2021
Last Modified Date: 12 Apr 2021

Issue

The Tableau Postgres connector displays the following error while reading query results:

"Error 0x4F2352E8"

Environment

  • Tableau Desktop 2020.4.4 and later
  • Tableau Server 2020.4.4 and later
  • Tableau Online
  • Tableau Postgres

Resolution

You will need to reduce the fetch size by using a TDC file.

See the .xml code example below. Adjust the fetch-size-custom value to suit your needs. Smaller values will use less memory, but will increase the time to retrieve the results. The acceptable value that can be customized using TDC is between 1 and 5000. 
The suggested value for spatial types:10
The suggested value for other type:100

<?xml version='1.0' encoding='utf-8' ?>
<connection-customization class="postgres" enabled="true" version="10">
<vendor name="postgres"/>
<driver name="postgres"/>
<customizations>
<customization name="fetch-size-custom" value="1"/>
</customizations>
</connection-customization>

You can apply this TDC in two ways:

  • To all datasources on Tableau Server.
  • To a single datasource in Tableau Desktop or Prep Desktop.
The fetch size is saved in the datasource after publishing, if the TDC file is applied. This is the recommended way, so that the reduced fetch size doesn’t slow down all datasources.

Tableau Desktop:

Install the TDC in My Tableau Repository/Datasources.

Tableau Online:

You will have to download the datasource and re-publish from a Desktop product with the .tdc applied. Once the .tdc is applied you may want to remove it, so that the reduced fetch size no longer applies to their datasources.

Other products:

Install in their folder, for example My Tableau Prep Repository/Datasources
Ensure that the filename ends in .tdc, for example: postgres.tdc

Cause

This error is caused when a single block of rows,  a single fetch, exceeds the memory limits. This usually occurs with long VARCHAR columns or spatial types.
Did this article resolve the issue?