X-Original-To: pgsql-performance@postgresql.org Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id B42A5475FEE for ; Mon, 17 Mar 2003 11:11:02 -0500 (EST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.8/8.12.8) with ESMTP id h2HGB5ub006662; Mon, 17 Mar 2003 11:11:05 -0500 (EST) To: Greg Stark Cc: Aaron Krowne , Sean Chittenden , pgsql-performance@postgresql.org Subject: Re: postgresql meltdown on PlanetMath.org In-reply-to: <87hea2assw.fsf@stark.dyndns.tv> References: <20030316060125.GD19570@vt.edu> <20030316061208.GA62529@perrin.int.nxad.com> <20030316080601.GF19570@vt.edu> <20030316082024.GA66903@perrin.int.nxad.com> <20030316083011.GG19570@vt.edu> <19394.1047803852@sss.pgh.pa.us> <87hea2assw.fsf@stark.dyndns.tv> Comments: In-reply-to Greg Stark message dated "17 Mar 2003 10:58:39 -0500" Date: Mon, 17 Mar 2003 11:11:05 -0500 Message-ID: <6661.1047917465@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200303/117 X-Sequence-Number: 1415 Greg Stark writes: > Is there any easy way to check an existing table for lost free space? contrib/pgstattuple gives a pretty good set of statistics. (I thought VACUUM VERBOSE printed something about total free space in a table, but apparently only VACUUM FULL VERBOSE does. Maybe should change that.) > Is there any way vauum could do this check and print a warning suggesting > using vaccuum full and/or increasing fsm parameters if it finds such? In CVS tip, a whole-database VACUUM VERBOSE gives info about the free space map occupancy, eg INFO: Free space map: 224 relations, 450 pages stored; 3776 total pages needed. Allocated FSM size: 1000 relations + 20000 pages = 178 KB shared mem. If the "pages needed" number is drastically larger than the allocated FSM size, you've got a problem. (I don't think you need to panic if it's just a little larger, though. 10X bigger would be time to do something, 2X bigger maybe not.) regards, tom lane