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

From: Corey Taylor <corey(dot)taylor(dot)fl(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: postgres 9.6: insert into select finishes only in pgadmin not psql
Date: 2019-09-18 21:00:40
Message-ID: CADBz384j3nVLiAHkLk+mXP4tszrs_QjdiNb6WnZ=v1+hzzvUQw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2019-09-18 21:32:27 Re: postgres 9.6: insert into select finishes only in pgadmin not psql
Previous Message Paul Jungwirth 2019-09-18 19:28:06 Re: When does Postgres use binary I/O?