mirror of
https://github.com/dimitri/pgloader.git
synced 2026-05-04 18:36:12 +02:00
Fix handling of errors in utility threads (create index and such).
This commit is contained in:
parent
00d3886ba6
commit
c16a56690a
@ -56,10 +56,14 @@
|
||||
"Execute given SQL and resgister its timing into STATE."
|
||||
(multiple-value-bind (res secs)
|
||||
(timing
|
||||
(with-pgsql-transaction (dbname)
|
||||
(pgsql-execute sql)))
|
||||
(handler-case
|
||||
(with-pgsql-transaction (dbname)
|
||||
(pgsql-execute sql))
|
||||
(cl-postgres:database-error (e)
|
||||
(declare (ignore e)) ; a log has already been printed
|
||||
(pgstate-incf state label :errs 1 :rows (- count)))))
|
||||
(declare (ignore res))
|
||||
(pgstate-incf state label :rows count :secs secs)))
|
||||
(pgstate-incf state label :read count :rows count :secs secs)))
|
||||
|
||||
(defun pgsql-execute (sql &key ((:client-min-messages level)))
|
||||
"Execute given SQL in current transaction"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user