lazy_scan_heap() should release lock on buffer before vacuuming FSM

Поиск
Список
Период
Сортировка
От Melanie Plageman
Тема lazy_scan_heap() should release lock on buffer before vacuuming FSM
Дата
Msg-id CAAKRu_YiL=44GvGnt1dpYouDSSoV7wzxVoXs8m3p311rp-TVQQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: lazy_scan_heap() should release lock on buffer before vacuuming FSM  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
Hi,

I noticed that in lazy_scan_heap(), when there are no indexes on the
table being vacuumed, we don't release the lock on the heap page buffer
before vacuuming the freespace map. Other call sites of
FreeSpaceMapVacuumRange() hold no such lock. It seems like a waste to
hold a lock we don't need.

ISTM the fix (attached) is just to move down the call to
FreeSpaceMapVacuumRange() to after we've released the lock and recorded
the space we just freed.

- Melanie

Вложения

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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Why do indexes and sorts use the database collation?
Следующее
От: Melanie Plageman
Дата:
Сообщение: Emit fewer vacuum records by reaping removable tuples during pruning