mirror of
https://github.com/dimitri/pgloader.git
synced 2026-05-04 18:36:12 +02:00
Don't catch all and any errors for retrying batches.
In particular a non existing table or column shouldn't be considered as an error we can just retry upon receiving.
This commit is contained in:
parent
a090f2fe3d
commit
3b2119cae4
@ -29,7 +29,11 @@
|
||||
|
||||
;; If PostgreSQL signals a data error, process the batch by isolating
|
||||
;; erroneous data away and retrying the rest.
|
||||
(cl-postgres-error::database-error (condition)
|
||||
((or
|
||||
cl-postgres-error::data-exception
|
||||
cl-postgres-error::integrity-violation
|
||||
cl-postgres-error::insufficient-resources
|
||||
cl-postgres-error::program-limit-exceeded) (condition)
|
||||
(retry-batch table-name columns batch batch-rows condition))))
|
||||
|
||||
;;;
|
||||
@ -194,7 +198,11 @@
|
||||
(incf current-batch-pos current-batch-rows))))
|
||||
|
||||
;; the batch didn't make it, prepare error handling for next turn
|
||||
(cl-postgres-error::database-error (next-error-in-batch)
|
||||
((or
|
||||
cl-postgres-error::data-exception
|
||||
cl-postgres-error::integrity-violation
|
||||
cl-postgres-error::insufficient-resources
|
||||
cl-postgres-error::program-limit-exceeded) (next-error-in-batch)
|
||||
|
||||
(setf condition next-error-in-batch
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user