Re: hash_xlog_split_allocate_page: failed to acquire cleanup lock

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: hash_xlog_split_allocate_page: failed to acquire cleanup lock
Дата
Msg-id 1577903.1660694118@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: hash_xlog_split_allocate_page: failed to acquire cleanup lock  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: hash_xlog_split_allocate_page: failed to acquire cleanup lock  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> What sort of random things would someone do with pageinspect functions
> that would hold buffer pins on one buffer while locking another one?
> The functions in hashfuncs.c don't even seem like they would access
> multiple buffers in total, let alone at overlapping times. And I don't
> think that a query pageinspect could realistically be suspended while
> holding a buffer pin either. If you wrapped it in a cursor it'd be
> suspended before or after accessing any given buffer, not right in the
> middle of that operation.

pin != access.  Unless things have changed really drastically since
I last looked, a seqscan will sit on a buffer pin throughout the
series of fetches from a single page.

Admittedly, that's about *heap* page pins while indexscans have
different rules.  But I recall that btrees at least use persistent
pins as well.

It may be that there is indeed no way to make this happen with
available SQL tools.  But I wouldn't put a lot of money on that,
and even less that it'll stay true in the future.

Having said that, you're right that this is qualitatively different
from the other bug, in that this is a deadlock not apparent data
corruption.  However, IIUC it's an LWLock deadlock, which we don't
handle all that nicely.

            regards, tom lane



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: hash_xlog_split_allocate_page: failed to acquire cleanup lock
Следующее
От: Andres Freund
Дата:
Сообщение: Re: hash_xlog_split_allocate_page: failed to acquire cleanup lock