Re: lazy_scan_heap() forgets to mark buffer dirty when setting allfrozen?

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: lazy_scan_heap() forgets to mark buffer dirty when setting allfrozen?
Дата
Msg-id 20190408044820.GA6454@alvherre.pgsql
обсуждение исходный текст
Ответ на lazy_scan_heap() forgets to mark buffer dirty when setting allfrozen?  (Andres Freund <andres@anarazel.de>)
Ответы Re: lazy_scan_heap() forgets to mark buffer dirty when setting allfrozen?  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On 2019-Apr-07, Andres Freund wrote:

> lazy_scan_heap() contains the following block:
> 
>         /*
>          * If the all-visible page is turned out to be all-frozen but not
>          * marked, we should so mark it.  Note that all_frozen is only valid
>          * if all_visible is true, so we must check both.
>          */
>         else if (all_visible_according_to_vm && all_visible && all_frozen &&
>                  !VM_ALL_FROZEN(onerel, blkno, &vmbuffer))
>         {
>             /*
>              * We can pass InvalidTransactionId as the cutoff XID here,
>              * because setting the all-frozen bit doesn't cause recovery
>              * conflicts.
>              */
>             visibilitymap_set(onerel, blkno, buf, InvalidXLogRecPtr,
>                               vmbuffer, InvalidTransactionId,
>                               VISIBILITYMAP_ALL_FROZEN);
>         }
> 
> but I'm afraid that's not quite enough.

Apparently the initial commit a892234f830e had MarkBufferDirty, but it
was removed one week later by 77a1d1e79892.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



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

Предыдущее
От: Amit Langote
Дата:
Сообщение: Re: selecting from partitions and constraint exclusion
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: reloption to prevent VACUUM from truncating empty pages at theend of relation