On Tue, Aug 27, 2019 at 12:34 PM Arnaud L. <arnaud.listes@xxxxxxxxx> wrote: > I could do this but it would make the script a lot more complicated. > There are a lot of views that I \copy directly to this share, and this > is the only one that poses any problem. I would however give it a try. I would schedule a nightly execution with a local path to see if that completes. > Sorry, I don't undertand either. Your question was "Does it hangs > against the same line content or the same line number?". > I run an sql script that contains a bunch of \copy commands. It is > always the same \copy that is hanging. Now I got it: your script is hanging against a specific \copy command, while I was thinking it was hanging once it was dumping a specific table line from your copy. > I could write the file locally, but for robustness I'm trying not to > rely on the local FS so that this script could be run from any machine > on the network without modifications. My personal experience with shares and network that are not so much stable is that they can block, and that is why I'm suggesting to try on the local filesystem to see if that is a share-related problem or a resource problem. Also scheduling the script at a different time could help, because it could be at that time the machine (and it could mean the sharing machine) is busy at the point it does not respond. Luca