Re: Add pg_buffercache_mark_dirty[_all] functions to the pg_buffercache

Поиск
Список
Период
Сортировка
От 邱宇航
Тема Re: Add pg_buffercache_mark_dirty[_all] functions to the pg_buffercache
Дата
Msg-id D5BB1D85-0F2A-419F-A7B1-426505525D3A@gmail.com
обсуждение исходный текст
Ответ на Add pg_buffercache_mark_dirty[_all] functions to the pg_buffercache  (Nazir Bilal Yavuz <byavuz81@gmail.com>)
Ответы Re: Add pg_buffercache_mark_dirty[_all] functions to the pg_buffercache
Список pgsql-hackers
I suggest using a conditional lock on the buffer, which would be more
appropriate here. Additionally, the function should return whether
the buffer is marked as dirty, the number of buffers marked as dirty.

This change would also make pg_buffercache_mark_dirty_{relation, all}
behave more consistently with pg_buffercache_evict_{relation,all}.

Lastly, `CHECK_FOR_INTERRUPTS()` should be added inside the loop over
`NBuffers` to ensure it can be interrupted during long-running
operations.

Best regards,
Yuhang Qiu




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