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

From Adrian Klaver
Subject Re: psql \copy hanging
Date
Msg-id 5612153a-af11-38da-c34e-8b4bab9cfc8e@aklaver.com
Whole thread Raw
In response to Re: psql \copy hanging  ("Arnaud L." <arnaud.listes@codata.eu>)
Responses Re: psql \copy hanging
List pgsql-general
On 10/8/19 12:06 AM, Arnaud L. wrote:
> Le 07/10/2019 à 16:36, Adrian Klaver a écrit :
>> So you are saying that you have not run the problematic line by itself?
> 
> It hung during last night's run.
> 
> I had modified my batch script to run the \copy commands separately, 
> i.e. it now reads as :
> psql -h myserver -a mydb < originalscriptwithoutproblematicline.sql
> psql -h myserver -a mydb < problematicline.sql

This is going to be hard to troubleshoot if you change your commands.

Previously you had:
psql -h %MYPGSERVER% -a -f myscript.sql %MYPGDB%

Changing more then one thing at a time makes it that much more difficult 
to isolate the issue.

I would create an entirely separate batch file that runs just 
problematicline.sql.

Given that you suspect Postgres it would be helpful to see the query 
that underlies the view you are copying.

You might want to look at autoexplain:

https://www.postgresql.org/docs/11/auto-explain.html

as a way of getting information at run time.


> 
> It hung at the problematic line, so during the second psql command.
> 
> I'm really at loss... I *believe* that the problem lies either in psql 
> or in PostgreSQL, but I really don't know what to try now.
> 
> 
> Regards
> -- 
> Arnaud
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com



pgsql-general by date:

Previous
From: Shatamjeev Dewan
Date:
Subject: RE: Declarative Range Partitioning Postgres 11
Next
From: "Arnaud L."
Date:
Subject: Re: psql \copy hanging