Re: [HACKERS] background sessions

Поиск
Список
Период
Сортировка
От Andrew Borodin
Тема Re: [HACKERS] background sessions
Дата
Msg-id CAJEAwVE39yZ-ko+87Tp7yOL5x=2QccQ_+fH7hhn5Jgysmd_jzA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] background sessions  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Ответы Re: [HACKERS] background sessions  (amul sul <sulamul@gmail.com>)
Re: [HACKERS] background sessions  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Список pgsql-hackers
2016-12-15 0:30 GMT+05:00 Peter Eisentraut <peter.eisentraut@2ndquadrant.com>:
>>>> TryBeginSession()?
>>>
>>> What exactly would that do?
>> Return status (success\failure) and session object, if a function succeeded.
>>
>> If there is max_connections exceeded, then (false,null).
>>
>> I'm not sure whether this idiom is common for Python.
>
> You can catch PostgreSQL exceptions in PL/Python, so this can be handled
> in user code.
>
> Some better connection management or pooling can probably be built on
> top of the primitives later, I'd say.

Agree, doing this in Python is the better option.

And one more thing... Can we have BackgroundSessionExecute() splitted
into two parts: start query and wait for results?
It would allow pg_background to reuse bgsession's code.

Best regards, Andrey Borodin.



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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: [HACKERS] Password identifiers, protocol aging and SCRAM protocol
Следующее
От: amul sul
Дата:
Сообщение: Re: [HACKERS] background sessions