Re: psql \copy hanging - Mailing list pgsql-general

From Luca Ferrari
Subject Re: psql \copy hanging
Date
Msg-id CAKoxK+4TWweuGqjpRtcQc3r==3N9mTb=qW0+qPi8YAAev6hhHw@mail.gmail.com
Whole thread Raw
In response to Re: psql \copy hanging  ("Arnaud L." <arnaud.listes@codata.eu>)
Responses Re: psql \copy hanging  ("Arnaud L." <arnaud.listes@codata.eu>)
List pgsql-general
On Tue, Aug 27, 2019 at 10:48 AM Arnaud L. <arnaud.listes@codata.eu> wrote:
> I can run the script just fine during working hours.

I meant thru your scheduler (cron or something).

> 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?


> This line is simply the longest running query because the view inside
> the select outputs almost 1M rows and does some subqueries.
>

I still don't get: is the line content the longest or the highest
numbered in the output?

> 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.

Luca



pgsql-general by date:

Previous
From: "Arnaud L."
Date:
Subject: Re: psql \copy hanging
Next
From: Tony Shelver
Date:
Subject: Re: How to set up PostGIS to support ArcGIS, MapInfo and QGIS desktop users?