Commit 6c3f9eb
committed
Fix a crash when an exception is thrown in postprocessing
Postprocessing (like building indexes) on output tables happens in
parallel. If there is a problem an exception is thrown which is
forwarded to the main thread. Here the normal exception handling will
clean up everything including the table datastructures still used by the
postprocessing of the other tables which might still be in flight.
We fix this by storing the exception, waiting for all threads to finish
and only then passing on the exception.
It is rather unlikely that we'll see this problem in the pgsql output
because tables are more or less hardcoded there. It is more likely in
the flex output, where users have many options of creating some havoc
with unusual table definitions or so. In the flex output we store a
pointer to the table so that we can print its name to help narrowing
down the problem somewhat.1 parent 1f708bd commit 6c3f9eb
2 files changed
+24
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1076 | 1076 | | |
1077 | 1077 | | |
1078 | 1078 | | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
1079 | 1082 | | |
1080 | | - | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
1081 | 1095 | | |
1082 | 1096 | | |
1083 | 1097 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
| 162 | + | |
162 | 163 | | |
163 | | - | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
164 | 172 | | |
165 | 173 | | |
166 | 174 | | |
| |||
0 commit comments