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.96) (envelope-from ) id 1x4lWL-007NJB-00 for pgsql-hackers@arkaria.postgresql.org; Thu, 10 Sep 2026 20:37:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1x4lWK-0099C3-00 for pgsql-hackers@arkaria.postgresql.org; Thu, 10 Sep 2026 20:37:20 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1x4lWJ-0099Bk-2K for pgsql-hackers@lists.postgresql.org; Thu, 10 Sep 2026 20:37:19 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1x4lWH-000000051Ec-1HlF for pgsql-hackers@lists.postgresql.org; Thu, 10 Sep 2026 20:37:18 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.18.1/8.18.1) with ESMTP id 68AKbFqh927669; Thu, 10 Sep 2026 16:37:15 -0400 From: Tom Lane To: Robert Haas cc: Daniel Gustafsson , PostgreSQL Hackers Subject: Re: Trying to break online checksums with LLMs In-reply-to: References: Comments: In-reply-to Robert Haas message dated "Thu, 10 Sep 2026 16:33:21 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <927667.1789072635.1@sss.pgh.pa.us> Date: Thu, 10 Sep 2026 16:37:15 -0400 Message-ID: <927668.1789072635@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Robert Haas writes: > But much more seriously, Claude also noticed this: In general, if > PostgreSQL creates a relation and then crashes before commit, the > relation files are left on disk and not removed, but there's no > catalog entry pointing to them any more. If checksums are enabled > using pg_checksums, such files are updated to have checksums as well. > But this feature enables checksums by working through the catalog, so > it won't update those files. That means that if, at any point in the > history of the cluster, there's ever been a crash that left a relation > file behind on disk, and then you use this feature to enable > checksums, and then after that you take a base backup, checksum > verification will fail, and thus the backup will fail. I don't quite > see how we can actually fix this, and it seems like a serious problem. Don't we have logic somewhere to clean up orphaned relation files? regards, tom lane