Re: [HACKERS] CONNECTION LIMIT and Parallel Query don't play well together

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: [HACKERS] CONNECTION LIMIT and Parallel Query don't play well together
Дата
Msg-id CA+TgmoZ-K=7JXJ8qjW-x_5g1dx4NiBENgVM1N+2LSSSRfguVFQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] CONNECTION LIMIT and Parallel Query don't play welltogether  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Список pgsql-hackers
On Wed, Feb 15, 2017 at 11:19 AM, Peter Eisentraut
<peter.eisentraut@2ndquadrant.com> wrote:
> On 1/11/17 5:51 PM, David Rowley wrote:
>> Now, since background workers
>> don't consume anything from max_connections, then I don't really feel
>> that a background worker should count towards "CONNECTION LIMIT". I'd
>> assume any CONNECTION LIMITs that are set for a user would be
>> calculated based on what max_connections is set to. If we want to
>> limit background workers in the same manner, then perhaps we'd want to
>> invent something like "WORKER LIMIT N" in CREATE USER.
>
> This explanation makes sense, but it kind of upset my background
> sessions patch, which would previously have been limited by per-user
> connection settings.
>
> So I would like to have a background worker limit per user, as you
> allude to.  Attached is a patch that implements a GUC setting
> max_worker_processes_per_user.
>
> Besides the uses for background sessions, but it can also be useful for
> parallel workers, logical replication apply workers, or things like
> third-party partitioning extensions.
>
> Thoughts?

This isn't going to deliver consistent results if it's set differently
in different sessions, although maybe you could weasel around that by
wording the documentation in just the right way.  It seems OK
otherwise.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: [HACKERS] CONNECTION LIMIT and Parallel Query don't play welltogether
Следующее
От: Robert Haas
Дата:
Сообщение: Re: [HACKERS] Parallel bitmap heap scan