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 1jRGEH-00047m-QL for pgsql-hackers@arkaria.postgresql.org; Wed, 22 Apr 2020 14:19:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jRGEG-0005j4-CV for pgsql-hackers@arkaria.postgresql.org; Wed, 22 Apr 2020 14:19:56 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jRGEG-0005ij-5t for pgsql-hackers@lists.postgresql.org; Wed, 22 Apr 2020 14:19:56 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jRGED-0000BX-UY for pgsql-hackers@postgresql.org; Wed, 22 Apr 2020 14:19:55 +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 03MEJpSf006831; Wed, 22 Apr 2020 10:19:51 -0400 From: Tom Lane To: Alexander Lakhin cc: Peter Eisentraut , pgsql-hackers Subject: Re: HEAPDEBUGALL is broken In-reply-to: <8936216c-3492-3f6e-634b-d638fddc5f91@gmail.com> References: <645c0646-4218-d4c3-409a-a7003a0c108d@2ndquadrant.com> <3070eb7d-e06d-31a0-5b68-4ae088fd146c@gmail.com> <8936216c-3492-3f6e-634b-d638fddc5f91@gmail.com> Comments: In-reply-to Alexander Lakhin message dated "Wed, 22 Apr 2020 07:00:00 +0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <6829.1587565191.1@sss.pgh.pa.us> Date: Wed, 22 Apr 2020 10:19:51 -0400 Message-ID: <6830.1587565191@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Alexander Lakhin writes: > 21.04.2020 21:01, Peter Eisentraut wrote: >> Do you have a proposed patch? > As this is broken at least since the invention of the generational > allocator (2017-11-23, a4ccc1ce), I believe than no one uses this (and > slab is broken too). Nonetheless, HAVE_ALLOCINFO in aset.c is still > working, so it could be leaved alone, though the output too chatty for > general use (`make check` produces postmaster log of size 3.8GB). I > think someone would still need to insert some extra conditions to use > that or find another way to debug memory allocations. > So I would just remove this debug macro. The proposed patch is attached. I didn't review this in close detail, but I think it's a good idea. We have better memory-use-analysis tools these days, such as valgrind, so it's no surprise that nobody is using this old code. regards, tom lane