Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 035611337B43 for ; Mon, 28 Mar 2011 07:33:15 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 38870-08 for ; Mon, 28 Mar 2011 10:33:05 +0000 (UTC) X-Greylist: delayed 00:06:05.919823 by SQLgrey-1.7.6 Received: from Acrys.COM (vpn.acrys.com [195.145.38.66]) by mail.postgresql.org (Postfix) with ESMTP id 68D0E1337B96 for ; Mon, 28 Mar 2011 07:33:03 -0300 (ADT) Received: from nb-pruy.pruy.de (nb-pruy.acrys.com [10.0.2.73]) by Acrys.COM (8.14.4/8.14.4/2.13) with ESMTP id p2SAQs19024787 for ; Mon, 28 Mar 2011 12:26:55 +0200 (CEST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.96.5 at gaia.acrys.com Message-ID: <4D906269.6060109@commandprompt.com> Date: Mon, 28 Mar 2011 12:26:49 +0200 From: Alvaro Herrera Reply-To: Alvaro Herrera User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.2.14) Gecko/20110221 SUSE/3.1.8 Lightning/1.0b2 Thunderbird/3.1.8 ThunderBrowse/3.3.5 MIME-Version: 1.0 To: pgsql-bugs@postgresql.org Subject: Re: BUG #5946: Long exclusive lock taken by vacuum (not full) References: <201103250856.p2P8ufGc004544@wwwmaster.postgresql.org> <4345.1301066239@sss.pgh.pa.us> <13556.1301069421@sss.pgh.pa.us> <1301080686-sup-7539@alvh.no-ip.org> <15329.1301082238@sss.pgh.pa.us> <16028.1301086103@sss.pgh.pa.us> <16369.1301088892@sss.pgh.pa.us> In-Reply-To: <16369.1301088892@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-5 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201103/357 X-Sequence-Number: 29867 Likely "too large" is more an issue related to available resources than of absolute figure. On a penta byte of free storage I would not mind allocating some teras with extending a (large) table. If I'm left with some MB only, I'd be concerned for sure. I still prefer an approach that will "just work", without much fiddling of all kind of knobs. I'd see the following points: - There is a minimum size of allocation below which it is unreasonable /inefficient to do allocations - doing allocations on sizes based on current table size honor the assumption that a large table will grow further (and thus somehow improve this track of grows) - large growth is "frightening" - largely (my assumption) due to unwanted behavior towards end of space So what seems to help out is twofold: - support readjusting of allocation size to smaller units in case an intended allocation could not be satisfied while sill allowing the minimum required space to be claimed - allow for allocated but unused space to be reclaimed (It is perfectly OK to have all of my "unused" disk space allocated to a large table that just happens to be not using it, if this can still be used later for some smaller table as soon as this is in need for some space.) Allocation should also take into account the amount of space left. This likely is something to be determined per tablespace.