Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lOoj0-0000tY-KY for pgsql-jdbc@arkaria.postgresql.org; Tue, 23 Mar 2021 21:38:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lOoiz-0001Ju-C1 for pgsql-jdbc@arkaria.postgresql.org; Tue, 23 Mar 2021 21:38:05 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lOoiz-0001IC-6A for pgsql-jdbc@lists.postgresql.org; Tue, 23 Mar 2021 21:38:05 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lOoix-0001TM-5S for pgsql-jdbc@lists.postgresql.org; Tue, 23 Mar 2021 21:38:04 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 12NLc1eb1012456; Tue, 23 Mar 2021 17:38:01 -0400 From: Tom Lane To: Robert Creager cc: pgsql-jdbc@lists.postgresql.org Subject: Re: COPY FROM STDIN hang In-reply-to: References: <1011556.1616534216@sss.pgh.pa.us> Comments: In-reply-to Robert Creager message dated "Tue, 23 Mar 2021 15:30:37 -0600" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <1012454.1616535481.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 23 Mar 2021 17:38:01 -0400 Message-ID: <1012455.1616535481@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Robert Creager writes: > On Mar 23, 2021, at 3:16 PM, Tom Lane wrote: >> You mean the backend hangs? Can you get a stack trace from that? > The entire backend doesn=E2=80=99t hang, we=E2=80=99re able to process q= ueries on other connections. It=E2=80=99s just the COPY FROM thread that=E2= =80=99s hung. Hmm, that set of traces doesn't really look like it's hung, it might just be taking a long time. A different theory, which is hard to prove without debug symbols to provide more detail in the trace, is that it might be looping due to following a closed loop of btree page right-links. Which shouldn't happen normally, but perhaps this index is corrupt. Can you try reindexing the indexes of the COPY's target table? regards, tom lane