postgres 9.6: insert into select finishes only in pgadmin not psql - Mailing list pgsql-general

From Corey Taylor
Subject postgres 9.6: insert into select finishes only in pgadmin not psql
Date
Msg-id CADBz384j3nVLiAHkLk+mXP4tszrs_QjdiNb6WnZ=v1+hzzvUQw@mail.gmail.com
Whole thread Raw
Responses Re: postgres 9.6: insert into select finishes only in pgadmin not psql
List pgsql-general
If this is a common question or an article exists, please let me know.  I couldn't find anything specific about it in stack overflow questions or postgres/psql documentation.

This is in PostgreSQL 9.6. 
 
I am trying to figure out how to debug an issue where a function 'import_wss' called through pgadmin4 will complete but not through psql. 

The function is simply a wrapper around an INSERT INTO SELECT that copies about 800k rows with some id and string conversions.  This completes in about 1min through pgadmin, but does not finish when run through psql.

There are cases where the psql call does finish, but it is rare and after running several tests I can't say what conditions there are.  I am running with a simple select like:

psql -c 'select import_wss()'

The only relevant issues I've run across are cases where there are multiple inserts separated by semi-colons.  However, this is a single insert and query logging shows the same query run by both pgadmin and psql.

There is no other load on the db.  I can reproduce this issue right after creating the db and running the script.

corey

pgsql-general by date:

Previous
From: Paul Jungwirth
Date:
Subject: Re: When does Postgres use binary I/O?
Next
From: Tom Lane
Date:
Subject: Re: postgres 9.6: insert into select finishes only in pgadmin not psql