Re: psql \copy hanging

From: Luca Ferrari <fluca1978(at)gmail(dot)com>
To: arnaud(dot)listes(at)codata(dot)eu
Cc: pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: psql \copy hanging
Date: 2019-08-27 11:13:27
Message-ID: CAKoxK+7hnFS6N0t57nsSBKGrKO5PjKZ5mRrvuxZ4yz4n0Pv-jg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Aug 27, 2019 at 12:34 PM Arnaud L. <arnaud(dot)listes(at)codata(dot)eu> 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Arnaud L. 2019-08-27 11:17:17 Re: psql \copy hanging
Previous Message Giuseppe Sacco 2019-08-27 10:40:36 Re: Question about password character in ECPG's connection string