Re: [Patch] Optimize dropping of relation buffers using dlist

Поиск
Список
Период
Сортировка
От Thomas Munro
Тема Re: [Patch] Optimize dropping of relation buffers using dlist
Дата
Msg-id CA+hUKGLxeLxXGG0RAEasZAh_QKzXPshV6i--dKcPtr6k5dCf0g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [Patch] Optimize dropping of relation buffers using dlist  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Список pgsql-hackers
On Thu, Oct 22, 2020 at 9:50 PM Kyotaro Horiguchi
<horikyota.ntt@gmail.com> wrote:
> By the way, heap scan finds the size of target relation using
> smgrnblocks().  I'm not sure why we don't miss recently-extended pages
> on a heap-scan?  It seems to be possible that concurrent checkpoint
> fsyncs relation files inbetween the extension and scanning and the
> scanning gets smaller size than it really is.

Yeah.  That's a narrow window: fsync() returns an error after the file
shrinks and we immediately panic.  A version with a wider window: the
kernel tries to write in the background, gets an I/O error, shrinks
the file, but we don't know this and we continue running until the
next checkpoint calls fsync(), sees the error and panics.  Seq scans
between those two events fail to see recently committed data at the
end of the table.



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

Предыдущее
От: Kyotaro Horiguchi
Дата:
Сообщение: Re: Enumize logical replication message actions
Следующее
От: John Naylor
Дата:
Сообщение: Re: speed up unicode decomposition and recomposition