mirror of
https://github.com/dimitri/pgloader.git
synced 2025-08-13 01:37:00 +02:00
Handle CL-POSTGRES::PROTOCOL-ERROR for batch retry.
This commit is contained in:
parent
165f74b197
commit
40e9c438fa
@ -313,7 +313,8 @@ Finally returns how many rows where read and processed."
|
|||||||
(cl-postgres:close-db-writer copier))
|
(cl-postgres:close-db-writer copier))
|
||||||
((or
|
((or
|
||||||
CL-POSTGRES-ERROR:UNIQUE-VIOLATION
|
CL-POSTGRES-ERROR:UNIQUE-VIOLATION
|
||||||
CL-POSTGRES-ERROR:DATA-EXCEPTION) (e)
|
CL-POSTGRES-ERROR:DATA-EXCEPTION
|
||||||
|
CL-POSTGRES::PROTOCOL-ERROR) (e)
|
||||||
(progn
|
(progn
|
||||||
(log-message :debug "pgsql:copy-from-queue: ~a" e)
|
(log-message :debug "pgsql:copy-from-queue: ~a" e)
|
||||||
(retry-batch dbname table-name
|
(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
|
;; the batch didn't make it, recurse
|
||||||
((or
|
((or
|
||||||
CL-POSTGRES-ERROR:UNIQUE-VIOLATION
|
CL-POSTGRES-ERROR:UNIQUE-VIOLATION
|
||||||
CL-POSTGRES-ERROR:DATA-EXCEPTION) (condition)
|
CL-POSTGRES-ERROR:DATA-EXCEPTION
|
||||||
|
CL-POSTGRES::PROTOCOL-ERROR) (condition)
|
||||||
;; process bad data
|
;; process bad data
|
||||||
(if (= 1 current-batch-size)
|
(if (= 1 current-batch-size)
|
||||||
(process-bad-row table-name condition (car current-batch))
|
(process-bad-row table-name condition (car current-batch))
|
||||||
|
Loading…
Reference in New Issue
Block a user