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

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: [HACKERS] CONNECTION LIMIT and Parallel Query don't play well together
Дата
Msg-id CAKJS1f9cdGwxPJSd1jScJ=2pEiAUyLnyMTw7bMTiQ=Z=Sfs6oA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] CONNECTION LIMIT and Parallel Query don't play welltogether  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Ответы Re: [HACKERS] CONNECTION LIMIT and Parallel Query don't play well together  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-hackers
On 24 August 2017 at 11:15, Peter Eisentraut
<peter.eisentraut@2ndquadrant.com> wrote:
> Here is a slightly updated patch for consideration in the upcoming
> commit fest.

Hi Peter,

I just had a quick glance over this and wondered about 2 things.

1. Why a GUC and not a new per user option so it can be configured
differently for different users? Something like ALTER USER ... WORKER
LIMIT <n>; perhaps. I mentioned about this up-thread a bit.

2.

+ if (count > max_worker_processes_per_user)
+ {
+ ereport(LOG,
+ (errcode(ERRCODE_CONFIGURATION_LIMIT_EXCEEDED),
+ errmsg("too many worker processes for role \"%s\"",
+ GetUserNameFromId(GetUserId(), false))));
+ LWLockRelease(BackgroundWorkerLock);
+ return false;

Unless I've misunderstood something, it seems that this is going to
give random errors to users which might only occur when they run
queries against larger tables. Part of why it made sense not to count
workers towards the CONNECTION LIMIT was the fact that we didn't want
to throw these random errors when workers could not be obtained when
we take precautions in other places to just silently have fewer
workers. There's lots of discussions earlier in this thread about this
and I don't think anyone was in favour of queries randomly working
sometimes.

-- David Rowley                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services



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

Предыдущее
От: Ioseph Kim
Дата:
Сообщение: Re: [HACKERS] locale problem of bgworker: logical replicationlauncher and worker process
Следующее
От: Chris Travers
Дата:
Сообщение: Re: [HACKERS] Thoughts on unit testing?