Repository navigation
Commit 3c09d06
committed
fix(postgres): failed loudly on a plain-SQL restore error
A plain-format restore ran `psql --quiet` without ON_ERROR_STOP, so psql
swallowed per-statement errors and still exited 0. Restoring a plain dump onto a
non-empty database (e.g. a live instance whose schema was already created on
boot) therefore reported success while restoring little or nothing.
Added `--set ON_ERROR_STOP=1` to both plain psql branches so the first failed
statement aborts with a non-zero exit, which the runner surfaces as a failed
restore. No change on the intended fresh/empty-DB path. Surfaced by the NocoDB
two-mode restore audit (DB-mode strategy).1 parent 0c75abe commit 3c09d06
2 files changed
Lines changed: 16 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
109 | 112 | | |
110 | | - | |
111 | | - | |
| 113 | + | |
| 114 | + | |
112 | 115 | | |
113 | 116 | | |
114 | 117 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
105 | 116 | | |
106 | 117 | | |
107 | 118 | | |
| |||
0 commit comments