[PATCH] Infinite loop while acquiring new TOAST Oid

Поиск
Список
Период
Сортировка
От Nikita Malakhov
Тема [PATCH] Infinite loop while acquiring new TOAST Oid
Дата
Msg-id CAN-LCVPRvRzxeUdYdDCZ7UwZQs1NmZpqBUCd=+RdMPFTyt-bRQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: [PATCH] Infinite loop while acquiring new TOAST Oid  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
Hi hackers!

While working on Pluggable TOAST we've detected a defective behavior
on tables with large amounts of TOASTed data - queries freeze and DB stalls.
Further investigation led us to the loop with GetNewOidWithIndex function
call - when all available Oid already exist in the related TOAST table this
loop continues infinitely. Data type used for value ID is the UINT32, which is
unsigned int and has a maximum value of 4294967295 which allows
maximum 4294967295 records in the TOAST table. It is not a very big amount
for modern databases and is the major problem for productive systems.

Quick fix for this problem is limiting GetNewOidWithIndex loops to some
reasonable amount defined by related macro and returning error if there is
still no available Oid. Please check attached patch, any feedback is appreciated.

--
Regards,
Nikita Malakhov
Postgres Professional 
Вложения

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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Bug in wait time when waiting on nested subtransaction
Следующее
От: Robert Haas
Дата:
Сообщение: Re: fixing CREATEROLE