Better error messages when lacking connection slots for autovacuumworkers and bgworkers

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Better error messages when lacking connection slots for autovacuumworkers and bgworkers
Дата
Msg-id 20190213051309.GF5746@paquier.xyz
обсуждение исходный текст
Ответы Re: [Suspect SPAM] Better error messages when lacking connectionslots for autovacuum workers and bgworkers  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
Список pgsql-hackers
Hi all,

When lacking connection slots, the backend returns a simple "sorry,
too many clients", which is something that has been tweaked by recent
commit ea92368 for WAL senders.  However, the same message would show
up for autovacuum workers and bgworkers.  Based on the way autovacuum
workers are spawned by the launcher, and the way bgworkers are added,
it seems that this cannot actually happen.  Still, in my opinion,
providing more context can be helpful for people trying to work on
features related to such code so as they can get more information than
what would normally happen for normal backends.

I am wondering as well if this could not help for issues like this
one, which has popped out today and makes me wonder if we don't have
race conditions with the way dynamic bgworkers are spawned:
https://www.postgresql.org/message-id/CAONUJSM5X259vAnnwSpqu=VnRECfGSJ-CgRHyS4P5YyRVwkXsQ@mail.gmail.com

There are four code paths which report the original "sorry, too many
clients", and the one of the patch attached can easily track the
type of connection slot used which helps for better context messages
when a process is initialized.

Would that be helpful for at least debugging purposes?

Thanks,
--
Michael

Вложения

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

Предыдущее
От: Tatsuro Yamada
Дата:
Сообщение: Re: monitoring CREATE INDEX [CONCURRENTLY]
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: Refactoring the checkpointer's fsync request queue