Usage Note 67606: Using the UseDeclareFetch PostgreSQL option might prevent "Out of memory" errors when you read from PostgreSQL
In some cases, when reading large amounts of data from PostgreSQL into SAS® software, you might encounter an error similar to the following:
ERROR: CLI describe error: Out of memory while reading tuples.;No query has been executed with that handle
If you are using SAS/ACCESS® Interface to PostgreSQL, adding the PostgreSQL driver option UseDelcareFetch can help eliminate this error. When you use this option in a LIBNAME or Explicit Pass-Through statement, you must also use the CONOPTS= option, as shown below:
libname x postgres server=xxxx conopts="UseDeclareFetch=1";
If you are using the open-source PostgreSQL driver with SAS/ACCESS® Interface to ODBC, you must add the option to your ODBC data source.
Click the Hot Fix tab in this note to access the hot fix for this issue.
The hot fix in this SAS Note is for the Threaded Kernel Table Services (TKTS) PostgreSQL Driver commonly used by SAS® Federation Server. This hot fix adds a TK option called USE_DECLARE_FETCH and sets it to YES by default. If you do not want this option enabled after applying the hot fix, you can add the option to the connection string to disable it by specifying NO, as shown below:
"DRIVER=FEDSQL;conopts=(DRIVER=POSTGRES;SERVER=machine.name.com;PORT=5432;database=pg1; UID=user1;PWD=pass1;USE_DECLARE_FETCH=NO;CATALOG=POSTGRES_SERVICE);"
Operating System and Release Information
SAS System | SAS/ACCESS Interface to PostgreSQL | Microsoft Windows Server 2012 R2 Std | 9.4_M7 | 9.4_M8 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows Server 2012 Datacenter | 9.4_M7 | 9.4_M8 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows 8 Enterprise x64 | 9.4_M7 | 9.4_M8 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows 8 Pro 32-bit | 9.4_M7 | 9.4_M8 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows 8 Pro x64 | 9.4_M7 | 9.4_M8 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows 8.1 Enterprise 32-bit | 9.4_M7 | 9.4_M8 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows 8.1 Enterprise x64 | 9.4_M7 | 9.4_M8 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows 8.1 Pro 32-bit | 9.4_M7 | 9.4_M8 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows 8.1 Pro x64 | 9.4_M7 | 9.4_M8 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows 10 | 9.4_M7 | 9.4_M8 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows 8 Enterprise 32-bit | 9.4_M7 | 9.4_M8 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft® Windows® for x64 | 9.4_M7 | 9.4_M8 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows Server 2012 R2 Datacenter | 9.4_M7 | 9.4_M8 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows Server 2012 Std | 9.4_M7 | 9.4_M8 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows Server 2016 | 9.4_M7 | 9.4_M8 | 9.4 TS1M7 | 9.4 TS1M8 |
Microsoft Windows Server 2019 | 9.4_M7 | 9.4_M8 | 9.4 TS1M7 | 9.4 TS1M8 |
Windows 7 Enterprise 32 bit | 9.4_M7 | 9.4_M8 | 9.4 TS1M7 | 9.4 TS1M8 |
Windows 7 Enterprise x64 | 9.4_M7 | 9.4_M8 | 9.4 TS1M7 | 9.4 TS1M8 |
Windows 7 Home Premium 32 bit | 9.4_M7 | 9.4_M8 | 9.4 TS1M7 | 9.4 TS1M8 |
Windows 7 Home Premium x64 | 9.4_M7 | 9.4_M8 | 9.4 TS1M7 | 9.4 TS1M8 |
Windows 7 Professional 32 bit | 9.4_M7 | 9.4_M8 | 9.4 TS1M7 | 9.4 TS1M8 |
Windows 7 Professional x64 | 9.4_M7 | 9.4_M8 | 9.4 TS1M7 | 9.4 TS1M8 |
Windows 7 Ultimate 32 bit | 9.4_M7 | 9.4_M8 | 9.4 TS1M7 | 9.4 TS1M8 |
Windows 7 Ultimate x64 | 9.4_M7 | 9.4_M8 | 9.4 TS1M7 | 9.4 TS1M8 |
64-bit Enabled AIX | 9.4_M7 | 9.4_M8 | 9.4 TS1M7 | 9.4 TS1M8 |
64-bit Enabled Solaris | 9.4_M7 | 9.4_M8 | 9.4 TS1M7 | 9.4 TS1M8 |
HP-UX IPF | 9.4_M7 | 9.4_M8 | 9.4 TS1M7 | 9.4 TS1M8 |
Linux for x64 | 9.4_M7 | 9.4_M8 | 9.4 TS1M7 | 9.4 TS1M8 |
Solaris for x64 | 9.4_M7 | 9.4_M8 | 9.4 TS1M7 | 9.4 TS1M8 |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
Date Modified: | 2021-03-19 12:46:10 |
Date Created: | 2021-03-16 09:56:59 |