| От | David Geier |
|---|---|
| Тема | Fix assertion in autovacuum worker |
| Дата | |
| Msg-id | b12f9e22-2618-42b8-8644-88bae192c7fd@gmail.com обсуждение исходный текст |
| Ответы |
Re: Fix assertion in autovacuum worker
|
| Список | pgsql-hackers |
Hi hackers,
PostgreSQL hit the following assertion during error cleanup, after being
OOM in dsa_allocate0():
void dshash_detach(dshash_table *hash_table) {
ASSERT_NO_PARTITION_LOCKS_HELD_BY_ME(hash_table);
called from pgstat_shutdown_hook(), called from shmem_exit(), called
from proc_exit(), called from the exception handler.
The partition locks got previously acquired by
AutoVacWorkerMain() pgstat_report_autovac()
pgstat_get_entry_ref_locked() pgstat_get_entry_ref()
dshash_find_or_insert() resize() resize() locks all partitions so the
hash table can safely be resized. Then it calls dsa_allocate0(). If
dsa_allocate0() fails to allocate, it errors out. The exception handler
calls proc_exit() which normally calls LWLockReleaseAll() via
AbortTransaction() but only if there's an active transaction. However,
pgstat_report_autovac() runs before a transaction got started and hence
LWLockReleaseAll() doesn't run before pgstat_shutdown_hook() is called.
See attached patch for an attempt to fix this issue.
--
David Geier
(ServiceNow)
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера