ERROR: current transaction is aborted, commands ignored until end of transaction block --- export data from Aqua studio

ERROR: current transaction is aborted, commands ignored until end of transaction block --- export data from Aqua studio

我正在尝试将一个 table 从 Aquastudio 导出到 CSV 文件中。 table 有大约 440 万行。当我尝试在 aqua studio 中使用 export window 函数时,我遇到了以下错误:

Error: ERROR: current transaction is aborted, commands ignored until end of transaction block

我不明白问题出在哪里。我阅读了一些关于这个错误的文章,发现这是由于最后一个 postgreSQL 命令中的一些错误而发生的。我没有为此导出使用任何 SQL 命令,我不知道如何调试它。我也无法查看日志文件。

您可能不应该通过 JDBC/ODBC 连接导出数百万行,尤其是对于 Redshift。

对于 Redshift,请使用 UNLOAD command documented here。您必须 UNLOAD 将文件传输到 S3 并从那里下载。

对于 Postgres,使用 COPY TO as documented here

使用rollback取消之前的查询。之后,您将能够执行当前查询。