Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jZJsn-0000YX-78 for pgsql-hackers@arkaria.postgresql.org; Thu, 14 May 2020 19:51:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jZJsm-0005AQ-1Z for pgsql-hackers@arkaria.postgresql.org; Thu, 14 May 2020 19:51:04 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jZJsl-000556-QL for pgsql-hackers@lists.postgresql.org; Thu, 14 May 2020 19:51:03 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jZJsj-0002k0-KT for pgsql-hackers@postgresql.org; Thu, 14 May 2020 19:51:03 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id 04EJoqFr013719; Thu, 14 May 2020 15:50:52 -0400 From: Tom Lane To: Alvaro Herrera cc: Robert Haas , Peter Geoghegan , Mark Dilger , Andres Freund , PostgreSQL-development Subject: Re: new heapcheck contrib module In-reply-to: <20200514193140.GA19814@alvherre.pgsql> References: <20200514193140.GA19814@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Thu, 14 May 2020 15:31:40 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <13717.1589485852.1@sss.pgh.pa.us> Date: Thu, 14 May 2020 15:50:52 -0400 Message-ID: <13718.1589485852@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Alvaro Herrera writes: > On 2020-May-14, Robert Haas wrote: >> If you mean that we shouldn't have the buildfarm run the proposed heap >> corruption checker against heap pages full of randomly-generated >> garbage, I tend to agree. Such a test wouldn't be very stable and >> might fail in lots of low-probability ways that could require >> unreasonable effort to find and fix. > This is what I meant. I was thinking of blocks generated randomly. Yeah, -1 for using random data --- when it fails, how you gonna reproduce the problem? >> If you mean that we shouldn't have the buildfarm run the proposed heap >> corruption checker against any corrupted heap pages at all, I tend to >> disagree. > Yeah, IMV those would not be arbitrarily corrupted -- instead they're > crafted to be corrupted in some specific way. I think there's definitely value in corrupting data in some predictable (reproducible) way and verifying that the check code catches it and responds as expected. Sure, this will not be 100% coverage, but it'll be a lot better than 0% coverage. regards, tom lane