Re: Proposal for disk quota feature

Поиск
Список
Период
Сортировка
От Chapman Flack
Тема Re: Proposal for disk quota feature
Дата
Msg-id e39626e5-c123-f328-6493-b9169628786b@anastigmatix.net
обсуждение исходный текст
Ответ на Proposal for disk quota feature  (Hubert Zhang <hzhang@pivotal.io>)
Ответы Re: Proposal for disk quota feature
Список pgsql-hackers
On 08/30/2018 09:57 AM, Hubert Zhang wrote:

> 2 Keep one worker process for each database. But using a parent/global
> quota worker process to manage the lifecycle of database level worker
> processes. It could handle the newly created database(avoid restart
> database) and save resource when a database is not used. But this needs to
> change worker process to be hierarchical. Postmaster becomes the grandfather
>  of database level worker processes in this case.

I am using background workers this way in 9.5 at $work.

In my case, one worker lives forever, wakes up on a set period, and
starts a short-lived worker for every database, waiting for each
one before starting the next.

It was straightforward to implement. Looking back over the code,
I see the global worker assigns its own PID to worker.bgw_notify_pid
of each of its children, and also obtains a handle for each child
from RegisterDynamicBackgroundWorker().

I imagine the global quota worker would prefer to start workers
for every database and then just wait for notifications from any
of them, but that seems equally straightforward at first glance.

-Chap


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

Предыдущее
От: Alexander Korotkov
Дата:
Сообщение: Re: Dimension limit in contrib/cube (dump/restore hazard?)
Следующее
От: Alexander Korotkov
Дата:
Сообщение: Re: Startup cost of sequential scan