Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gt0JE-0000lo-2y for pgsql-hackers@arkaria.postgresql.org; Mon, 11 Feb 2019 01:22:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gt0JC-000611-SE for pgsql-hackers@arkaria.postgresql.org; Mon, 11 Feb 2019 01:22:54 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gt0JC-0005zp-L0 for pgsql-hackers@lists.postgresql.org; Mon, 11 Feb 2019 01:22:54 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gt0JA-00051d-50 for pgsql-hackers@lists.postgresql.org; Mon, 11 Feb 2019 01:22:54 +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 x1B1MjK6025698; Sun, 10 Feb 2019 20:22:46 -0500 From: Tom Lane To: Thomas Munro cc: Robert Haas , Jakub Glapa , Justin Pryzby , Fabio Isabettini , Arne Roland , Sand Stone , Rick Otten , PostgreSQL Hackers Subject: Re: dsa_allocate() faliure In-reply-to: References: <6f3fe9fa5a984dc19e40e79fbef45edc@index.de> <6c2e8a16999f4e17b975d7369f6605b4@index.de> <45C7466A-7D67-4BB4-829C-F66CBB2961DB@voipfuture.com> <20190206232110.GH29720@telsasoft.com> <15839.1549841633@sss.pgh.pa.us> Comments: In-reply-to Thomas Munro message dated "Mon, 11 Feb 2019 11:24:38 +1100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <25696.1549848165.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sun, 10 Feb 2019 20:22:45 -0500 Message-ID: <25697.1549848165@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Thomas Munro writes: > On Mon, Feb 11, 2019 at 10:33 AM Tom Lane wrote: >> I observe from >> https://coverage.postgresql.org/src/backend/utils/mmgr/freepage.c.gcov.= html >> that the edge cases in this function aren't too well exercised by >> our regression tests, meaning that the buildfarm might not prove >> much either way about the correctness of this patch. That is one >> factor pushing me to think we shouldn't risk it. But, taking a >> longer view, is that something that's practical to improve? > Yeah. This is a nice example of code that really deserves unit tests > written in C. Could be good motivation to built the infrastructure I > mentioned here: > https://www.postgresql.org/message-id/flat/CAEepm%3D2heu%2B5zwB65jWap3XY= -UP6PpJZiKLQRSV2UQH9BmVRXQ%40mail.gmail.com Meh. I think if you hold out for that, you're going to be waiting a long time. I was thinking more along the lines of making a test API in src/test/modules/, akin to what we've got for predtest or rbtree. regards, tom lane