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 1txThy-009yZi-Dn for pgsql-admin@arkaria.postgresql.org; Wed, 26 Mar 2025 16:34:26 +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 1txThx-006Xld-4N for pgsql-admin@arkaria.postgresql.org; Wed, 26 Mar 2025 16:34:25 +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 1txTgX-006So9-8w for pgsql-admin@lists.postgresql.org; Wed, 26 Mar 2025 16:32:57 +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.96) (envelope-from ) id 1txTgV-001LXd-0F for pgsql-admin@lists.postgresql.org; Wed, 26 Mar 2025 16:32:56 +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 52QGWrZr1627988; Wed, 26 Mar 2025 12:32:53 -0400 From: Tom Lane To: Udo Polder cc: pgsql-admin@lists.postgresql.org Subject: Re: Problem with "on conflict" In-reply-to: <939e57d2-9294-4557-b436-eb5e9b268f6f@gmail.com> References: <939e57d2-9294-4557-b436-eb5e9b268f6f@gmail.com> Comments: In-reply-to Udo Polder message dated "Wed, 26 Mar 2025 17:15:47 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <1627986.1743006773.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Wed, 26 Mar 2025 12:32:53 -0400 Message-ID: <1627987.1743006773@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Udo Polder writes: > I had some error today at a customer and i figured out, the problem is > triggered by postgres doing an insert on a table with wrong data (not > even provided), when it should insert the data. > After some playing around with the query, the error just went away, > magically …. Hmmm... > Postgres is: > PostgreSQL 14.1 (Debian 14.1-1.pgdg110+1) on x86_64-pc-linux-gnu, > compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit If it's really 14.1, that's quite ancient and full of known bugs. The first thing you ought to do is update to latest minor release, 14.17. I did not look at the release notes to see if any fixes overlap this area, but it'd be silly to spend a lot of time tracking down a problem only to find it's already fixed. regards, tom lane