X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id B2469D9A8D for ; Tue, 4 Oct 2005 11:06:24 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 32300-10 for ; Tue, 4 Oct 2005 14:06:20 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 65077DA001 for ; Tue, 4 Oct 2005 11:06:22 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j94E6OP3007789; Tue, 4 Oct 2005 10:06:24 -0400 (EDT) To: Martijn van Oosterhout Cc: Simon Riggs , Ron Peacetree , pgsql-hackers@postgresql.org Subject: Re: [PERFORM] A Better External Sort? In-reply-to: <20051004122443.GF17589@svana.org> References: <18329659.1128188552696.JavaMail.root@elwamui-polski.atl.sa.earthlink.net> <20051001215602.GG13830@svana.org> <29837.1128223567@sss.pgh.pa.us> <20051002123240.GA30492@svana.org> <20051002193835.GJ30492@svana.org> <1128376292.8603.142.camel@localhost.localdomain> <20051004100441.GC17589@svana.org> <1128425094.8603.296.camel@localhost.localdomain> <20051004122443.GF17589@svana.org> Comments: In-reply-to Martijn van Oosterhout message dated "Tue, 04 Oct 2005 14:24:46 +0200" Date: Tue, 04 Oct 2005 10:06:24 -0400 Message-ID: <7788.1128434784@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 required=5 tests=[AWL=0.006] X-Spam-Level: X-Archive-Number: 200510/175 X-Sequence-Number: 74034 Martijn van Oosterhout writes: > A quick binary search puts the cutoff between 1200 and 1300. Given > version variation I picked a nice round number, 1500. > Ugh, that's for -O2, for -O3 and above it needs to be 4100 to work. > Maybe we should go for 5000 or so. > I'm using: gcc (GCC) 3.3.5 (Debian 1:3.3.5-13) I don't know what the units of this number are, but it's apparently far too gcc-version-dependent to consider putting into our build scripts. Using gcc version 4.0.1 20050727 (current Fedora Core 4 compiler) on i386, and compiling tuplesort.c as you did, I find: -O2: warning goes away between 800 and 900 -O3: warning is always there (tried values up to 10000000) (the latter behavior may indicate a bug, not sure). What's even more interesting is that the warning does not appear in either case if I omit -finline-limit --- so the default value is plenty. At least on this particular compiler, the proposed switch would be counterproductive. regards, tom lane