Re: VACUUM touching file but not updating relation

From: Thom Brown <thom(at)linux(dot)com>
To: PGSQL Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: Re: VACUUM touching file but not updating relation
Date: 2011-11-10 23:07:10
Message-ID: CAA-aLv4vVHLMLWOqio9hUUBdL230aNg=+ny8OZAtMTTzJjY0Rw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On 14 October 2011 12:12, Thom Brown <thom(at)linux(dot)com> wrote:
> Hi,
>
> I just noticed that the VACUUM process touches a lot of relations
> (affects mtime) but for one file I looked at, it didn't change.  This
> doesn't always happen, and many relations aren't touched at all.
>
> I had the following relation:
>
> -rw-------  1 thom  staff      40960 13 Oct 16:06 11946
>
> Ran MD5 over the file:
>
> MD5 (11946) = d6626f930f1fb6d77c3907d3279fe693
>
> Then VACUUM ANALYSE'd all databases in full.
>
> This relation was supposedly affected:
>
> -rw-------  1 thom  staff      40960 14 Oct 11:27 11946
>
> But then I ran MD5 back over it:
>
> MD5 (11946) = d6626f930f1fb6d77c3907d3279fe693
>
> This is the same as before.  What is it doing?  Does this happen
> often?  And I can't find out what this particular OID relates to
> either.
>
> I'm using 9.2devel btw.

Does anyone know what happened here? I'm just wondering if there's
some action being performed on the file which can be avoided. Of
course I haven't determined how often this happens.

--
Thom Brown
Twitter: @darkixion
IRC (freenode): dark_ixion
Registered Linux user: #516935

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bborie Park 2011-11-11 00:06:03 Passing NULL to a function called with OidFunctionCall3
Previous Message Raghavendra 2011-11-10 23:00:09 Re: "idle in transaction" entry in pg_logs

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2011-11-10 23:12:13 Re: proposal: psql concise mode
Previous Message Robert Haas 2011-11-10 22:48:06 Re: LOCK_DEBUG is busted