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 1qkryD-00HE6l-NY for pgsql-bugs@arkaria.postgresql.org; Mon, 25 Sep 2023 20:14:17 +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 1qkryB-004fTs-OW for pgsql-bugs@arkaria.postgresql.org; Mon, 25 Sep 2023 20:14:15 +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 1qkryB-004fTg-F2 for pgsql-bugs@lists.postgresql.org; Mon, 25 Sep 2023 20:14:15 +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 1qkry8-007Y1s-93 for pgsql-bugs@lists.postgresql.org; Mon, 25 Sep 2023 20:14:14 +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 38PKEAEj262085; Mon, 25 Sep 2023 16:14:10 -0400 From: Tom Lane To: enderstd@gmail.com cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #18130: \copy fails with "could not read block" or "page should be empty but not" errors due to triggers In-reply-to: <18130-7a86a7356a75209d@postgresql.org> References: <18130-7a86a7356a75209d@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Fri, 22 Sep 2023 11:39:12 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <262083.1695672850.1@sss.pgh.pa.us> Date: Mon, 25 Sep 2023 16:14:10 -0400 Message-ID: <262084.1695672850@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk PG Bug reporting form writes: > I'm trying to copy a CSV file to a table and it errors out with different > error messages every time: Thank you for the report and reproducible test case! It looks to me like this is probably a bug in our new logic for extending tables more than one block at a time, and the connection to triggers is accidental. I brought it up in a thread that was already discussing the extension logic [1]. regards, tom lane [1] https://www.postgresql.org/message-id/257696.1695670946%40sss.pgh.pa.us