mirror of https://github.com/citusdata/citus.git
Fix worker crash when coordinator disconnects
parent
73e1d81bb3
commit
667280650d
|
@ -48,6 +48,9 @@ RedirectCopyDataToRegularFile(const char *filename)
|
||||||
|
|
||||||
fileDesc = FileOpenForTransmit(filename, fileFlags, fileMode);
|
fileDesc = FileOpenForTransmit(filename, fileFlags, fileMode);
|
||||||
|
|
||||||
|
PG_TRY();
|
||||||
|
{
|
||||||
|
|
||||||
SendCopyInStart();
|
SendCopyInStart();
|
||||||
|
|
||||||
copyDone = ReceiveCopyData(copyData);
|
copyDone = ReceiveCopyData(copyData);
|
||||||
|
@ -73,6 +76,14 @@ RedirectCopyDataToRegularFile(const char *filename)
|
||||||
resetStringInfo(copyData);
|
resetStringInfo(copyData);
|
||||||
copyDone = ReceiveCopyData(copyData);
|
copyDone = ReceiveCopyData(copyData);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
PG_CATCH();
|
||||||
|
{
|
||||||
|
FreeStringInfo(copyData);
|
||||||
|
FileClose(fileDesc);
|
||||||
|
PG_RE_THROW();
|
||||||
|
}
|
||||||
|
PG_END_TRY();
|
||||||
|
|
||||||
FreeStringInfo(copyData);
|
FreeStringInfo(copyData);
|
||||||
FileClose(fileDesc);
|
FileClose(fileDesc);
|
||||||
|
|
Loading…
Reference in New Issue