Re: [HACKERS] PATCH: enabling parallel execution for cursorsexplicitly (experimental)

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: [HACKERS] PATCH: enabling parallel execution for cursorsexplicitly (experimental)
Дата
Msg-id CA+TgmoaJVMbQbHn3i_Uzz_vSGsbDsavYkPV4Tqz=Ubg+v8+LUQ@mail.gmail.com
обсуждение исходный текст
Ответ на [HACKERS] PATCH: enabling parallel execution for cursors explicitly(experimental)  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Ответы Re: [HACKERS] PATCH: enabling parallel execution for cursorsexplicitly (experimental)  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Re: [HACKERS] PATCH: enabling parallel execution for cursorsexplicitly (experimental)  (Simon Riggs <simon@2ndquadrant.com>)
Список pgsql-hackers
On Sat, Oct 14, 2017 at 2:14 PM, Tomas Vondra
<tomas.vondra@2ndquadrant.com> wrote:
> I propose is to add a new cursor option (PARALLEL), which would allow
> parallel plans for that particular user-defined cursor. Attached is an
> experimental patch doing this (I'm sure there are some loose ends).

I think you would need to do a huge amount of additional work in order
to actually make this robust.  I believe that a fair amount of what
goes on in parallel mode right now is checked with elog() if we think
that it's unreachable without writing C code -- but this will make a
lot of those things reachable, which means they would need to be
checked some other way.  Also, I doubt this guarantees that we won't
try to call parallel-unsafe functions will parallel mode is active, so
things will just blow up in whatever way they do, maybe crashing the
server or rendering the database inconsistent or whatever.

Possibly I'm overestimating the extent of the danger, but I don't
think so.  You're try to take a mechanism that was only ever meant to
be active during the course of one query and applying it for long
periods of time during which a user can do anything, with basically no
upgrade of the infrastructure.  I think something like this could be
made to work if you put a large amount of energy into it, but I think
the patch as proposed is about the easiest 3-5% of what would actually
be required to cover all the holes.

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


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

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

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: [HACKERS] SIGSEGV in BRIN autosummarize
Следующее
От: Prabhat Sahu
Дата:
Сообщение: [HACKERS] Query got Killed with CTE.