Re: VACUUM touching file but not updating relation

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: VACUUM touching file but not updating relation
Дата
Msg-id 21187.1320972934@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: VACUUM touching file but not updating relation  (Thom Brown <thom@linux.com>)
Ответы Re: VACUUM touching file but not updating relation
Список pgsql-general
Thom Brown <thom@linux.com> writes:
> On 14 October 2011 12:12, Thom Brown <thom@linux.com> wrote:
>> 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.

No immmediate ideas as to why the mtime would change if the file
contents didn't.  It seems like there must be a code path that marked
a buffer dirty without having changed it, but we're usually pretty
careful about that.

>> And I can't find out what this particular OID relates to
>> either.

Well, the generic method is

regression=# select oid,relname from pg_class where relfilenode = 11946;
  oid  |    relname
-------+----------------
 11563 | pg_toast_11561
(1 row)

This is a toast relation, so ...

regression=# select oid,relname from pg_class where reltoastrelid = 11563;
  oid  |   relname
-------+--------------
 11561 | sql_packages
(1 row)

So in my git-tip database, that relfilenode is
information_schema.sql_packages' TOAST table.  However, such OID
assignments aren't terribly stable in development tip, and it was almost
certainly something different a month ago (especially since
sql_packages' TOAST table is generally empty, and your file is not).
So you'll need to check this for yourself to see what it was, assuming
you still have that database around.  It's a safe bet that it was a
system catalog or index or toast table belonging thereto, though, just
based on the range of OIDs it's in.

            regards, tom lane

В списке pgsql-general по дате отправления:

Предыдущее
От: Bborie Park
Дата:
Сообщение: Re: Passing NULL to a function called with OidFunctionCall3
Следующее
От: Thom Brown
Дата:
Сообщение: Re: VACUUM touching file but not updating relation