I've just read this answer on DBA about moving databases. It contains this sentence:

The only problem is when the database is too big and the pipe collapses.

which is about this pipeline:

mysqldump --all-databases -uuser -ppassword | mysql -hremoteserver -uremoteuser -premoteserver 

The collapse is not described there. So my question here is how could a pipe collapse? (In this case and in general.) With Linux in focus, but other Unices are welcome as well.


If the reader of a pipe closes its end of the pipe, then the writer will get a signal (SIGPIPE) when it tries to write. This signal is lethal by default but can be caught.

In the context of the original post, I think "collapsing" just refers to the fact that since the reader part of the pipe is a mysql process opening a connection to a distant database, there's a risk of it losing the connection due to network errors, for instance. In this case, the mysql process will exit and return an error while the writer part is still writing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy