Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id E094813B3874 for ; Fri, 30 Mar 2012 07:15:06 -0300 (ADT) Received: from extern.innogames.de ([80.252.99.240]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SDYrI-0005eL-0L for pgsql-admin@postgresql.org; Fri, 30 Mar 2012 10:15:05 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by extern.innogames.de (Postfix) with ESMTP id 6670B28E324 for ; Fri, 30 Mar 2012 12:14:50 +0200 (CEST) Received: from extern.innogames.de ([127.0.0.1]) by localhost (extern.innogames.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id D7Gk+zzR1Mi2 for ; Fri, 30 Mar 2012 12:14:50 +0200 (CEST) Received: from [172.16.5.29] (unknown [212.48.107.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by extern.innogames.de (Postfix) with ESMTPSA id D152128E322 for ; Fri, 30 Mar 2012 12:14:46 +0200 (CEST) Message-ID: <4F758796.6090000@innogames.de> Date: Fri, 30 Mar 2012 12:14:46 +0200 From: Bernhard Schrader User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120310 Thunderbird/11.0 MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: Re: pg_database_size() and actual disk space usage References: <4F742D3A.8010501@gmail.com> <4F743C47.1040907@gmail.com> <4F746282.3060406@innogames.de> <4F755EBE.2070908@gmail.com> In-Reply-To: <4F755EBE.2070908@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201203/137 X-Sequence-Number: 39325 On 03/30/2012 09:20 AM, Alexander Fortin wrote: > On 3/29/12 3:24 PM, Bernhard Schrader wrote: >> Hi, >> >> which filesystem do you use, and which kernel is running? > > Hi Bernhard, > > it's XFS on Ubuntu server 11.10, Kernel is 3.0.0-16-virtual (m1.large > Ec2 instances) > Ok, well with Kernel 2.6.38 xfs introduced a new "feature" (i think it was dynamic preallocation) which caused some strange behaviour for me also, i discussed it on xfs mailinglist, maybe this gives you some hints of solving your different diskusages. http://old.nabble.com/Problems-with-filesizes-on-different-Kernels-td33342207.html#a33342207 At the end was the solution for me, but you can first check what i posted in the first message - testing base directory with du -sh and du --apparent-size -h i hope this will help you. regards