From: Arnaud L. <arnaud.listes@codata.eu>
To: Luca Ferrari <fluca1978@gmail.com>
Cc: pgsql-general <pgsql-general@lists.postgresql.org>
Subject: Re: psql \copy hanging
Date: Tue, 27 Aug 2019 10:48:03 +0200
Message-ID: <4f450814-5697-06b1-651b-540cac0a10b0@codata.eu> (raw)
In-Reply-To: <CAKoxK+5qWTmmEeGFU8nG3JxGuUKSMUnFtUFkEcjCCYLCWSqaew@mail.gmail.com>
References: <d5df5507-7491-5877-5412-c9325d0ec49c@codata.eu>
<6947a518-82dd-fc26-57b3-6da5e8b89445@codata.eu>
<CAKoxK+5qWTmmEeGFU8nG3JxGuUKSMUnFtUFkEcjCCYLCWSqaew@mail.gmail.com>
Le 27/08/2019 à 10:00, Luca Ferrari a écrit :
> On Tue, Aug 27, 2019 at 9:54 AM Arnaud L. <arnaud.listes@codata.eu> wrote:
>> Any other idea ? I'll change the lines order for tonight's run, but that
>> is not what I'd call a solution...
>
> Does it hangs against the same line content or the same line number?
> Are you able to run the script automatically during working hours (to
> avoid firewalling or upgrades running in parrallel to your nightly
> script execution)?
> Any chance something is querying the same data and a lock blocks the
> transaction (pg_locks)?
Hi Luca.
I can run the script just fine during working hours.
I checked pg_locks, and this pid is the only process requesting locks.
It has around 100 of them since it is a view querying multiple tables,
but I see nothing blocking. All locks are granted.
I have a csv output of pg_locks so I can post this if asked.
It hangs against the same line in the sql script, all lines being "\copy
(select ....) to 'file on unc share'".
This line is simply the longest running query because the view inside
the select outputs almost 1M rows and does some subqueries.
Also when the script is hung, output has not started (file size is 0).
> Just throwing on the table some desperate ideas....
Desperate ideas are very welcome !
Cheers
--
Arnaud
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: arnaud.listes@codata.eu, fluca1978@gmail.com
Subject: Re: psql \copy hanging
In-Reply-To: <4f450814-5697-06b1-651b-540cac0a10b0@codata.eu>
References: <d5df5507-7491-5877-5412-c9325d0ec49c@codata.eu> <6947a518-82dd-fc26-57b3-6da5e8b89445@codata.eu> <CAKoxK+5qWTmmEeGFU8nG3JxGuUKSMUnFtUFkEcjCCYLCWSqaew@mail.gmail.com> <4f450814-5697-06b1-651b-540cac0a10b0@codata.eu>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox