Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id 339002E003F for ; Fri, 6 Jun 2008 18:28:25 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 17985-05 for ; Fri, 6 Jun 2008 18:28:18 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sca-es-mail-1.sun.com (sca-es-mail-1.Sun.COM [192.18.43.132]) by developer.postgresql.org (Postfix) with ESMTP id A69632E0039 for ; Fri, 6 Jun 2008 18:28:21 -0300 (ADT) Received: from fe-sfbay-10.sun.com ([192.18.43.129]) by sca-es-mail-1.sun.com (8.13.7+Sun/8.12.9) with ESMTP id m56LSKkM004123 for ; Fri, 6 Jun 2008 14:28:20 -0700 (PDT) Received: from conversion-daemon.fe-sfbay-10.sun.com by fe-sfbay-10.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) id <0K2200H018XZAH00@fe-sfbay-10.sun.com> (original mail from Robert.Lor@Sun.COM) for pgsql-hackers@postgresql.org; Fri, 06 Jun 2008 14:28:20 -0700 (PDT) Received: from [192.168.1.108] ([70.253.78.76]) by fe-sfbay-10.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) with ESMTPSA id <0K2200GC58Z7SM00@fe-sfbay-10.sun.com>; Fri, 06 Jun 2008 14:28:20 -0700 (PDT) Date: Fri, 06 Jun 2008 16:29:12 -0500 From: Robert Lor Subject: Re: Overhauling GUCS In-reply-to: <200806061541.36984.xzilla@users.sourceforge.net> To: Robert Treat Cc: pgsql-hackers@postgresql.org, Greg Smith , Aidan Van Dyk Message-id: <4849AC28.4060801@sun.com> MIME-version: 1.0 Content-type: text/plain; format=flowed; charset=ISO-8859-1 Content-transfer-encoding: 7BIT References: <48409D1E.3070208@agliodbs.com> <20080605011455.GF14498@yugib.highrise.ca> <200806061541.36984.xzilla@users.sourceforge.net> User-Agent: Thunderbird 2.0.0.6 (X11/20071119) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200806/326 X-Sequence-Number: 119439 Robert Treat wrote: > On Wednesday 04 June 2008 22:04:54 Greg Smith wrote: > >> I was just talking to someone today about building a monitoring tool for >> this. Not having a clear way to recommend people monitor use of work_mem >> and its brother spilled to disk sorts is an issue right now, I'll whack >> that one myself if someone doesn't beat me to it before I get time. >> > > I remember *years* ago, someone wrote a perl script to poll pgsql_tmp and > print out anytime something showed up... you could probably find that in the > archives if you look around. > > of course to me this sounds like an excellent idea for a dtrace probe ;-) > > Actually, you can find out from the sort-end probe now whether or not the sort spilled to disk and number of disk blocks used. This is one of the probes from Simon. TRACE_POSTGRESQL_SORT_END(state->tapeset, (state->tapeset ? LogicalTapeSetBlocks(state->tapeset) : (state->allowedMem - state->availMem + 1023) / 1024)); -Robert