Received: from localhost (unknown [200.46.204.184]) by developer.postgresql.org (Postfix) with ESMTP id 63CA12E00E5 for ; Mon, 12 May 2008 16:11:04 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 38528-01-8 for ; Mon, 12 May 2008 16:10:55 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from gmp-eb-inf-1.sun.com (gmp-eb-inf-1.sun.com [192.18.6.21]) by developer.postgresql.org (Postfix) with ESMTP id B7E6B2E005D for ; Mon, 12 May 2008 16:10:11 -0300 (ADT) Received: from fe-emea-10.sun.com (gmp-eb-lb-2-fe3.eu.sun.com [192.18.6.12]) by gmp-eb-inf-1.sun.com (8.13.7+Sun/8.12.9) with ESMTP id m4CJA9C4004417 for ; Mon, 12 May 2008 19:10:09 GMT Received: from conversion-daemon.fe-emea-10.sun.com by fe-emea-10.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) id <0K0R00L01RWL7X00@fe-emea-10.sun.com> (original mail from Zdenek.Kotala@Sun.COM) for pgsql-hackers@postgresql.org; Mon, 12 May 2008 20:10:09 +0100 (BST) Received: from [192.168.2.4] ([89.103.93.253]) by fe-emea-10.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) with ESMTPSA id <0K0R0026ERWSMZ70@fe-emea-10.sun.com>; Mon, 12 May 2008 20:10:09 +0100 (BST) Date: Mon, 12 May 2008 21:08:05 +0200 From: Zdenek Kotala Subject: Re: bloated heapam.h In-reply-to: <20080512161350.GM5655@alvh.no-ip.org> To: Alvaro Herrera Cc: Tom Lane , Pg Hackers Message-id: <48289595.7050708@sun.com> MIME-version: 1.0 Content-type: text/plain; format=flowed; charset=us-ascii Content-transfer-encoding: 7BIT References: <20080509185610.GJ5748@alvh.no-ip.org> <48258C7C.9030103@sun.com> <20080510192615.GA9094@alvh.no-ip.org> <6911.1210453845@sss.pgh.pa.us> <20080511044745.GC9136@alvh.no-ip.org> <21641.1210531438@sss.pgh.pa.us> <20080512000642.GB5746@alvh.no-ip.org> <20080512002153.GC5746@alvh.no-ip.org> <20080512002853.GD5746@alvh.no-ip.org> <48283673.2080304@sun.com> <20080512161350.GM5655@alvh.no-ip.org> User-Agent: Thunderbird 2.0.0.12 (X11/20080325) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200805/375 X-Sequence-Number: 118374 Alvaro Herrera napsal(a): > Zdenek Kotala wrote: >> Alvaro Herrera wrote: > >>> (Digging further, it seems like bufpage.h should also include transam.h >>> in order to get TransactionIdIsNormal ... I start to wonder how many >>> problems of this nature we have on our headers. Without having a way to >>> detect whether the defined macros are valid, it seems hard to check >>> programatically, however.) >> I attached script which should check it. In first step it runs C >> preprocessor on each header (postgres.h is included as well). The output >> from first step is processed again with preprocessor and define.h is >> included. Define.h contains "all" used macros in following format: >> >> #define SIGABRT "NOT_EXPANDED_SIGABRT" >> >> Main problem is how to generate define.h. I used following magic: >> >> grep "^#define" `find . -name "*.h"` | cut -d" " -f 2 | cut -f 1 | cut -f 1 -d"(" >> >> but it generates some noise as well. Maybe some Perl or AWK magic should be better. > > So were you able to detect anything bogus with this technique? > No, everything looks OK. Zdenek