Re: VACUUM touching file but not updating relation

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: VACUUM touching file but not updating relation
Дата
Msg-id
13875.1321054105@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
VACUUM touching file but not updating relation Thom Brown <thom@linux.com>
Re: VACUUM touching file but not updating relation Thom Brown <thom@linux.com>
Re: VACUUM touching file but not updating relation Tom Lane <tgl@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 Tom Lane <tgl@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 Thom Brown <thom@linux.com>
Re: VACUUM touching file but not updating relation Tom Lane <tgl@sss.pgh.pa.us>
Re: VACUUM touching file but not updating relation Simon Riggs <simon@2ndQuadrant.com>
Re: VACUUM touching file but not updating relation Simon Riggs <simon@2ndQuadrant.com>
Re: VACUUM touching file but not updating relation Tom Lane <tgl@sss.pgh.pa.us>
Re: VACUUM touching file but not updating relation Simon Riggs <simon@2ndQuadrant.com>
Re: VACUUM touching file but not updating relation Simon Riggs <simon@2ndQuadrant.com>
Thom Brown  writes:
> On 11 November 2011 00:55, Tom Lane  wrote:
>> Thom Brown  writes:
>>> 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.

> I checked all files where the time stamp of the file had changed, but
> had the same MD5 sum.  I used the list in the query you mentioned and
> get: [ mostly indexes ]

Hmm, is this on a hot standby master?

I observe that _bt_delitems_vacuum() unconditionally dirties the page
and writes a WAL record, whether it has anything to do or not; and that
if XLogStandbyInfoActive() then btvacuumscan will indeed call it despite
there being (probably) nothing useful to do.  Seems like that could be
improved.  The comment explaining why it's necessary to do that doesn't
make any sense to me, either.

			regards, tom lane
В списке pgsql-general по дате отправления
От: Jerry Levan
Дата:
От: Thom Brown
Дата:
FAQ