| От | Tom Lane |
|---|---|
| Тема | Re: Why does VACUUM FULL bother locking pages? |
| Дата | |
| Msg-id | 4897.1126933164@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Why does VACUUM FULL bother locking pages? (Alvaro Herrera <alvherre@alvh.no-ip.org>) |
| Список | pgsql-hackers |
Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> So, the only callers of both has already acquired appropiate locks at
> the relation level -- nobody is going to be modifying the blocks while
> they proceed. So why bother locking the pages at all? Is there a
> reason or is this an historical accident?
No, because operations such as checkpointing and bgwriter will feel free
to write out pages that aren't exclusive-locked; they don't try to get
a lock at the table level. Failing to lock the buffer would risk
allowing an invalid page state to be written to disk --- which, if we
then crashed before writing the WAL record for the vacuum operation,
would represent unrecoverable corruption.
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера