Re: autovacuum truncate exclusive lock round two

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: autovacuum truncate exclusive lock round two
Дата
Msg-id 26446.1351172759@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: autovacuum truncate exclusive lock round two  (Jan Wieck <JanWieck@Yahoo.com>)
Ответы Re: autovacuum truncate exclusive lock round two
Список pgsql-hackers
Jan Wieck <JanWieck@Yahoo.com> writes:
> On 10/24/2012 10:46 PM, Stephen Frost wrote:
>> Would it be possible to use the FSM to figure out if things have changed
>> since the last scan..?  Does that scan update the FSM, which would then
>> be updated by another backend in the event that it decided to write
>> something there?  Or do we consider the FSM to be completely
>> untrustworthy wrt this (and if so, I don't suppose there's any hope to
>> using the visibility map...)?

> I honestly don't know if we can trust the FSM enough when it comes to 
> throwing away heap pages. Can we?

No.  Backends are under no obligation to update FSM for each individual
tuple insertion, and typically don't do so.

More to the point, you have to take AccessExclusiveLock *anyway*,
because this is interlocking not only against new insertions but plain
read-only seqscans: if a seqscan falls off the end of the table it will
be very unhappy.  So I don't see where we'd buy anything by consulting
the FSM.
        regards, tom lane



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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: unfixed bugs with extensions
Следующее
От: Tom Lane
Дата:
Сообщение: Re: unfixed bugs with extensions