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 1rwHek-000kok-2c for pgsql-general@arkaria.postgresql.org; Mon, 15 Apr 2024 08:25:38 +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 1rwHei-00BbRD-Lb for pgsql-general@arkaria.postgresql.org; Mon, 15 Apr 2024 08:25:36 +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 1rwHei-00BbR1-7V for pgsql-general@lists.postgresql.org; Mon, 15 Apr 2024 08:25:36 +0000 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rwHef-0012Yk-JN for pgsql-general@lists.postgresql.org; Mon, 15 Apr 2024 08:25:35 +0000 Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-56e69888a36so3915395a12.3 for ; Mon, 15 Apr 2024 01:25:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=peoplecall-com.20230601.gappssmtp.com; s=20230601; t=1713169532; x=1713774332; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Ydu6sxt5hAKX21qGeJgc2m8pbKL06wPLrkUG0vRynyM=; b=XjXAI6mm9H+IaLuBjrxQ/ZQoDTb7eV10/99ZMPC4RbOaPLykyX3sNL4+kAyiFOOm6R vPHUuMIa3qV9U6GAb3IpWWymwNXI9zEphEr2SZbiUSpBHw6v3cHbP1XKp2VBvjo2eckJ QkL3x/X4ht/blSLxWw7e4eiBFq36LQRX+D9iY8cF82JD72FwtUmO546wEq8AiRbWF3cV NhGhrk1OYww+x5lQFUo5BvUYKiyqmmAXZPX61m23YxmEjSObIYsQKU9nM2Lgb10nyAcd V7ewm3TdlxVZxud643fD4imHa5L28ddM6BQXAG0veH9Q8jD2LoM3pUp/ET+jWkSZh5ib VXsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713169532; x=1713774332; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ydu6sxt5hAKX21qGeJgc2m8pbKL06wPLrkUG0vRynyM=; b=SV7H8QJEPoRBkuuSGcz8dj0UFUMFWdjrqebB6tdfjr1cqojEOPOHWo+owCBJbpAskW RHpE9Cs3gRqi+mGfzzqu4cxiWtaEYTGtXogmVIuMEn/qeBoY5m0uHvKFwnSW/YV5oxj5 PAlJGqohIH5r2ODYswIUPUVqXSOmE1LFMWuLuOmT5KBbDmVkGRhqUrNd5hxH6OtNdpse hlfVwp2ioL62H76KzZxyhM3isd8FX1xL05IAxqh/aXC2X3E+DkG7ncogcSKEI3IIBUU0 PDIZNDkzLjETiumfIcHICAUlBGS7RKa5SiUR96k5P2RWwh53L33dNxNM+tcCmJU6SoA6 t6Kg== X-Gm-Message-State: AOJu0YxwdScx6vMTonZfDc62ZZ5zb0m62+fZ4LxWoqKpX+ng9ti0H110 KFqxTJpdKNSDhk3kujGhxxj4HFwoti7W3VYTbbqSQASouKLhkflKY/+TIcRoD//zyPrKY7sZ6GN G8JZpIy5se9WPX7u+apv3Jfzt2xKpq9u+OeU5 X-Google-Smtp-Source: AGHT+IEpS5f0OM/UkqCk6/4VhlWhlQeuQRn3ejc1q0fKtRaNY4ZCBJhilaWHjbWCQfNVka+IcQ+dXSIxMF8CxO1R6ac= X-Received: by 2002:a50:d553:0:b0:56b:d9e7:1233 with SMTP id f19-20020a50d553000000b0056bd9e71233mr4986205edj.32.1713169532236; Mon, 15 Apr 2024 01:25:32 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Francisco Olarte Date: Mon, 15 Apr 2024 10:24:55 +0200 Message-ID: Subject: Re: constant crashing To: jack Cc: "pgsql-general@lists.postgresql.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Jack: On Sun, 14 Apr 2024 at 22:18, jack wrote: > The CSV files are being produced by another system, a WIndows app on a Wi= ndows machine. I then copy them to a USB key and copy them onto the ubuntu = machine. The data is then imported via the COPY command. > > COPY master (field01,field02..fieldX) FROM '/data/file.text' DELIMITER E'= \t' > The fields are tab delimited. Then call them tab-delimited, not CSV. It may be important. You have a tendency of sending your interpretation of information which hampers people trying to help you. As an example, only about three messages above did we see the "signal 11" in the server logs which indicates a probable bug. Signal 11 is normally due to stray pointers or corrupted memory ( although faulty ram can lead to it too ), which hints at a bug, not a resource problem. > But importing the data works. I can get all the data into a single table = without any problems. The issue is only when I start to update the single t= able. And that is why I started using smaller temporary tables for each CSV= file, to do the updates in the smaller tables before I move them all to a = single large table. > After all the data is loaded and updated, I run php programs on the large= table to generate reports. All of which works well EXCEPT for performing t= he updates on the data. And I do not want to use perl or any outside tool. = I want it all one in SQL because I am required to document all my steps so = that someone else can take over, so everything needs to be as simple as pos= sible. I suggested perl ( or any similar thing, php should be equally fine ) as it normally makes your importing / debugging much easier / lighter. On the documentation side, you can have the data and some transformations in a big sql file, but having some steps in a php file will have them documented too. But if you want to do text processing in SQL, go ahead, the only problems are going to be making it harder to debug and probably harder to document. Now people know the signal 11 stuff and the problem can probably be tracked. Francisco Olarte.