Search Postgresql Archives

Re: psql \copy hanging

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Le 27/08/2019 à 10:57, Luca Ferrari a écrit :
On Tue, Aug 27, 2019 at 10:48 AM Arnaud L. <arnaud.listes@xxxxxxxxx> wrote:
I can run the script just fine during working hours.

I meant thru your scheduler (cron or something).

Yes, it runs fine too. There is indeed something happening on the server at this specific time but I don't know what.


It hangs against the same line in the sql script, all lines being "\copy
(select ....) to 'file on unc share'".

This is a new detail to me: what if you output to a local file and
move it after on the share?

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 still don't get: is the line content the longest or the highest
numbered in the output?

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.


Also when the script is hung, output has not started (file size is 0).

This makes me think there is some problem with the share, not the
script. Again: test against a local file that you move (rsync?) to the
share after.

Everything is windows based, so rsync is not really an option. There are alternatives of course. 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.

Cheers
--
Arnaud





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux