From 40e9c438fa508d401bfe6687d838e8d7292f30af Mon Sep 17 00:00:00 2001 From: Dimitri Fontaine Date: Fri, 4 Oct 2013 17:18:13 +0200 Subject: [PATCH] Handle CL-POSTGRES::PROTOCOL-ERROR for batch retry. --- pgsql.lisp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pgsql.lisp b/pgsql.lisp index bfb2e7d..f9037a7 100644 --- a/pgsql.lisp +++ b/pgsql.lisp @@ -313,7 +313,8 @@ Finally returns how many rows where read and processed." (cl-postgres:close-db-writer copier)) ((or CL-POSTGRES-ERROR:UNIQUE-VIOLATION - CL-POSTGRES-ERROR:DATA-EXCEPTION) (e) + CL-POSTGRES-ERROR:DATA-EXCEPTION + CL-POSTGRES::PROTOCOL-ERROR) (e) (progn (log-message :debug "pgsql:copy-from-queue: ~a" e) (retry-batch dbname table-name @@ -471,7 +472,8 @@ Finally returns how many rows where read and processed." ;; the batch didn't make it, recurse ((or CL-POSTGRES-ERROR:UNIQUE-VIOLATION - CL-POSTGRES-ERROR:DATA-EXCEPTION) (condition) + CL-POSTGRES-ERROR:DATA-EXCEPTION + CL-POSTGRES::PROTOCOL-ERROR) (condition) ;; process bad data (if (= 1 current-batch-size) (process-bad-row table-name condition (car current-batch))