postgres 9.6: insert into select finishes only in pgadmin not psql

Поиск
Список
Период
Сортировка
От Corey Taylor
Тема postgres 9.6: insert into select finishes only in pgadmin not psql
Дата
Msg-id CADBz384j3nVLiAHkLk+mXP4tszrs_QjdiNb6WnZ=v1+hzzvUQw@mail.gmail.com
обсуждение исходный текст
Ответы Re: postgres 9.6: insert into select finishes only in pgadmin not psql  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Paul Jungwirth
Дата:
Сообщение: Re: When does Postgres use binary I/O?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: postgres 9.6: insert into select finishes only in pgadmin not psql