Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rw1Qw-00GG7m-JS for pgsql-general@arkaria.postgresql.org; Sun, 14 Apr 2024 15:06:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rw1Qv-0078SM-19 for pgsql-general@arkaria.postgresql.org; Sun, 14 Apr 2024 15:06:17 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rw1Qu-0078SD-Mo for pgsql-general@lists.postgresql.org; Sun, 14 Apr 2024 15:06:16 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rw1Qo-000uSW-JS for pgsql-general@lists.postgresql.org; Sun, 14 Apr 2024 15:06:16 +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 43EF5vpA412544; Sun, 14 Apr 2024 11:05:57 -0400 From: Tom Lane To: jack cc: "pgsql-general@lists.postgresql.org" Subject: Re: constant crashing In-reply-to: References: Comments: In-reply-to jack message dated "Sun, 14 Apr 2024 14:24:44 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <412542.1713107157.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sun, 14 Apr 2024 11:05:57 -0400 Message-ID: <412543.1713107157@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk jack writes: > I am trying to load about 1.4 billion records into a postgresql table. > The data is in about 100 individual CSV files which I load individually = into the table using the COPY command. > After the data is loaded I perform updates to the data, and this is when= I get errors. Some updates work, some crash. > I am using psql and an SQL script file (update.sql) to perform the updat= ing (UPDATE table SET field=3DUPPER(field), etc.). > The errors are all "Server closed the connection unexpectedly" What appears in the postmaster log when this happens? It would also be instructive to run "top" while you trigger the problem, and see if there is obvious distress like the server process's memory consumption ballooning. It smells like a resource-exhaustion problem. Which probably shouldn't be happening on a machine with 128G RAM, but maybe something is misconfigured to give up way below that. In any case, you'll never find the cause from the client side. > Last attempts have been with ubuntu 22.04.04 and postgreSQL 16. 16 dot which? regards, tom lane