Skip to content

Commit 66a8a85

Browse files
committed
Ignore error if setting gp_max_csv_line_length failed
1 parent 0d2d208 commit 66a8a85

File tree

1 file changed

+6
-1
lines changed
  • gpdbwriter/src/main/java/cn/hashdata/datax/plugin/writer/gpdbwriter

1 file changed

+6
-1
lines changed

gpdbwriter/src/main/java/cn/hashdata/datax/plugin/writer/gpdbwriter/CopyWorker.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,11 @@ public Long call() throws Exception {
140140
private void changeCsvSizelimit(Connection conn) {
141141
List<String> sqls = new ArrayList<String>();
142142
sqls.add("set gp_max_csv_line_length = " + Integer.toString(MaxCsvSize));
143-
WriterUtil.executeSqls(conn, sqls, task.getJdbcUrl(), DataBaseType.PostgreSQL);
143+
144+
try {
145+
WriterUtil.executeSqls(conn, sqls, task.getJdbcUrl(), DataBaseType.PostgreSQL);
146+
} catch (Exception e) {
147+
LOG.warn("Cannot set gp_max_csv_line_length to " + MaxCsvSize);
148+
}
144149
}
145150
}

0 commit comments

Comments
 (0)