Re: IMMUTABLE and PARALLEL SAFE function markings

Поиск
Список
Период
Сортировка
От Stephen Frost
Тема Re: IMMUTABLE and PARALLEL SAFE function markings
Дата
Msg-id 20181127003918.GP3415@tamriel.snowman.net
обсуждение исходный текст
Ответ на Re: IMMUTABLE and PARALLEL SAFE function markings  (Vik Fearing <vik.fearing@2ndquadrant.com>)
Список pgsql-hackers
Greetings,

* Vik Fearing (vik.fearing@2ndquadrant.com) wrote:
> On 27/11/2018 01:13, Stephen Frost wrote:
> > Parallel safe functions should be marked as such.  Immutable functions
> > should be marked as such.  We should not assume that one implies the
> > other, nor should we operate as if they do.
>
> Yes we should!  Unless you can produce a case where an immutable
> function is not parallel safe.

What's the advantage of running a function that isn't marked as parallel
safe in a parallel worker because it's marked as immutable?

Seems like the only thing we're doing is making assumptions about what
the user meant when they've clearly told us something different and that
just strikes me as both a bad idea and an unnecessary complication of
the code.

Thanks!

Stephen

Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: IMMUTABLE and PARALLEL SAFE function markings
Следующее
От: Tom Lane
Дата:
Сообщение: Re: IMMUTABLE and PARALLEL SAFE function markings