Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iAhao-00037e-NX for pgsql-general@arkaria.postgresql.org; Wed, 18 Sep 2019 21:34:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iAhan-0003pb-Ia for pgsql-general@arkaria.postgresql.org; Wed, 18 Sep 2019 21:34:29 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iAhYu-0007R1-H0 for pgsql-general@lists.postgresql.org; Wed, 18 Sep 2019 21:32:32 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iAhYr-0006FQ-IU for pgsql-general@lists.postgresql.org; Wed, 18 Sep 2019 21:32:30 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x8ILWRja011668; Wed, 18 Sep 2019 17:32:27 -0400 From: Tom Lane To: Corey Taylor cc: pgsql-general@lists.postgresql.org Subject: Re: postgres 9.6: insert into select finishes only in pgadmin not psql In-reply-to: References: Comments: In-reply-to Corey Taylor message dated "Wed, 18 Sep 2019 16:00:40 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <11666.1568842347.1@sss.pgh.pa.us> Date: Wed, 18 Sep 2019 17:32:27 -0400 Message-ID: <11667.1568842347@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Corey Taylor writes: > 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. First thing I'd look at is whether it's the same execution environment in both cases, eg same search_path. You could try doing EXPLAIN rather than running the query outright, too, to see if you get identical plans. (Although if the performance issue is down inside the function, that might not help much.) regards, tom lane