Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id C067B1D7D622 for ; Fri, 20 Apr 2012 08:04:53 -0300 (ADT) Received: from mail-bk0-f46.google.com ([209.85.214.46]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SLBdx-0004AU-EH for pgsql-admin@postgresql.org; Fri, 20 Apr 2012 11:04:53 +0000 Received: by bkcik5 with SMTP id ik5so7085592bkc.19 for ; Fri, 20 Apr 2012 04:04:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=rPwTjyNZVvCaAZdLYpqh/TQhSztMkdCxStezxYdyC7Y=; b=qKOkKeGoYFwyunFNlHh2UlCyE0W9v5dPcedBqWL6YHoR03Jt0p8Ayq2ZIWDeV166k6 YdHxvJORydT/8Es9k3gVtzqrLgUdmeHoQ9skAS6RmUa27uMVdpDestdhkpsz91SMG01T sU9qi1r4/iF5CTtGMcPiiEZDKC5uQGw4nfB4Pkx7kPgo/j/5Hw+pJVqOo70LXx7jRLaQ kzLs2S+BHzQiCiamDPbaJIXMZaVFQMNZHVySdoqJuNm4s6KR/OTi0waBm992gOOwpDTD pUvu+CH10xVrtvaNLp8ZvJSghF2cXwIVrEg1XdAowCqxC1oolJeWJTk9a2j+AAv8rwnQ qShA== Received: by 10.204.154.10 with SMTP id m10mr1706580bkw.13.1334919876296; Fri, 20 Apr 2012 04:04:36 -0700 (PDT) Received: from zeus.local (88-149-210-7.dynamic.ngi.it. [88.149.210.7]) by mx.google.com with ESMTPS id r14sm9322885bkv.11.2012.04.20.04.04.32 (version=SSLv3 cipher=OTHER); Fri, 20 Apr 2012 04:04:33 -0700 (PDT) Message-ID: <4F9142C0.80008@gmail.com> Date: Fri, 20 Apr 2012 13:04:32 +0200 From: Alexander Fortin User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 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> <4F758796.6090000@innogames.de> In-Reply-To: <4F758796.6090000@innogames.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.6 (--) X-Archive-Number: 201204/113 X-Sequence-Number: 39449 On 3/30/12 12:14 PM, Bernhard Schrader wrote: > > 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. Hi Bernhard, just to say thank you to have pointed this out, it actually seems to be related to this "dynamic speculative EOF preallocation" feature of XFS. For the records, I've done a couple of checks and I can see clearly that it's definitely unrelated to Postgres (apparently seems that I can reproduce the change of data occupation on the XFS file system just accessing those files). Talk soon, -- Alexander Fortin http://about.me/alexanderfortin/