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 1sKQyF-00ACLN-UB for pgsql-hackers@arkaria.postgresql.org; Thu, 20 Jun 2024 23:13:35 +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 1sKQxF-003FP3-Ou for pgsql-hackers@arkaria.postgresql.org; Thu, 20 Jun 2024 23:12:34 +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.94.2) (envelope-from ) id 1sKQxF-003FLT-F8 for pgsql-hackers@lists.postgresql.org; Thu, 20 Jun 2024 23:12:33 +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.94.2) (envelope-from ) id 1sKQxD-002K9b-1b for pgsql-hackers@lists.postgresql.org; Thu, 20 Jun 2024 23:12:32 +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 45KNCMrx487328; Thu, 20 Jun 2024 19:12:22 -0400 From: Tom Lane To: Heikki Linnakangas cc: Alexander Lakhin , Thomas Munro , Tomas Vondra , Ronan Dunklau , PostgreSQL Hackers Subject: Re: Failures in constraints regression test, "read only 0 of 8192 bytes" In-reply-to: <680fafbe-3422-457d-95c2-90f9aa9ac592@iki.fi> References: <2185821.Icojqenx9y@aivenlaptop> <5c5a0015-723a-4fa7-85d5-2f0f47b92094@enterprisedb.com> <61ef0b89-1ec6-4d88-afbd-2ffc2c977511@enterprisedb.com> <05fd672f-2eac-4758-91e9-fa7afafa147e@enterprisedb.com> <50ebc494-0d52-4b76-bea4-f7ab5569300a@iki.fi> <987b1c8c-8c91-4847-ca0e-879f421680ff@gmail! .com> <680fafbe-3422-457d-95c2-90f9aa9ac592@iki.fi> Comments: In-reply-to Heikki Linnakangas message dated "Fri, 21 Jun 2024 01:52:37 +0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <487326.1718925142.1@sss.pgh.pa.us> Date: Thu, 20 Jun 2024 19:12:22 -0400 Message-ID: <487327.1718925142@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Heikki Linnakangas writes: > In commit af0e7deb4a, I removed the call to RelationCloseSmgr() from > RelationCacheInvalidate(). I thought it was no longer needed, because we > no longer free the underlying SmgrRelation. > However, it meant that if the relfilenode of the relation was changed, > the relation keeps pointing to the SMgrRelation of the old relfilenode. > So we still need the RelationCloseSmgr() call, in case the relfilenode > has changed. Ouch. How come we did not see this immediately in testing? I'd have thought surely such a bug would be exposed by any command that rewrites a heap. regards, tom lane