Re: Rename max_parallel_degree?

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Rename max_parallel_degree?
Дата
Msg-id CAKFQuwZ_WY3cBiZhYgyz3bJWZ79r=3ZFQ9eC6CgxRYn_CZXgMA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Rename max_parallel_degree?  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On Tue, May 31, 2016 at 4:12 PM, Robert Haas <robertmhaas@gmail.com> wrote:
On Tue, May 31, 2016 at 4:04 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Alvaro Herrera <alvherre@2ndquadrant.com> writes:
>> Robert Haas wrote:
>>> So I think in the long run we should have three limits:
>>>
>>> 1. Cluster-wide limit on number of worker processes for all purposes
>>> (currently, max_worker_processes).
>>>
>>> 2. Cluster-wide limit on number of worker processes for parallelism
>>> (don't have this yet).
>>>
>>> 3. Per-operation limit on number of worker processes for parallelism
>>> (currently, max_parallel_degree).
>>>
>>> Whatever we rename, there needs to be enough semantic space between #1
>>> and #3 to allow for the possibility - I think the very likely
>>> possibility - that we will eventually also want #2.
>
>> max_background_workers sounds fine to me for #1, and I propose to add #2
>> in 9.6 rather than wait.
>
> +1 to both points.
>
>> max_total_parallel_query_workers ?
>
> The name should be closely related to what we use for #3.  I could go for
> max_total_parallel_workers for #2 and max_parallel_workers for #3.
> Or maybe max_parallel_workers_total?

I just want to point out that if we change #1, we're breaking
postgresql.conf compatibility for, IMHO, not a whole lot of benefit.
I'd just leave it alone.

​+1

We shall assume that the DBA has set the value of max_worker_processes ​according to hardware specifications without regard to what exactly could be parallelized.
 

I would propose to call #2 max_parallel_workers and #3
max_parallel_degree, which I think is clear as daylight, but since I
invented all of these names, I guess I'm biased.

​So we have operation, session, and cluster scope yet no way to know which is which without memorizing the documentation.​

​While we cannot enforce this I'd say any of these that are intended to be changed by the user should have functions published as their official API.  The name of the function can be made to be user friendly.  For all the others pick a name with something closer to the 64 character limit that is as expressive as possible so that seeing the name in postgresql.conf is all person really needs to see to know that they are changing the right thing.​

I say you expectations are off if you want to encode these differences by using workers and degree at the same time.  Lets go for a part-time DBA vocabulary here.  I get the merit of degree, and by itself it might even be OK, but in our usage degree is theory while workers are actual and I'd say people are likely to relate better to the later.

David J.

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

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: Rename max_parallel_degree?
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: JSON[B] arrays are second-class citizens