Re: Parallel safety tagging of extension functions

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Parallel safety tagging of extension functions
Дата
Msg-id CA+TgmoYedOhLO5pDrYDQMGXFB+JLh8djYRKvbnKJuiDnSUAHOA@mail.gmail.com
обсуждение исходный текст
Ответ на Parallel safety tagging of extension functions  (Andreas Karlsson <andreas@proxel.se>)
Ответы Re: Parallel safety tagging of extension functions  (Robert Haas <robertmhaas@gmail.com>)
Re: Parallel safety tagging of extension functions  (Andreas Karlsson <andreas@proxel.se>)
Список pgsql-hackers
On Thu, May 19, 2016 at 5:50 PM, Andreas Karlsson <andreas@proxel.se> wrote:
> - How should we modify the aggregate functions when upgrading extensions?
> ALTER AGGREGATE cannot change COMBINEFUNC or PARALLEL. My current patch
> updates the system catalogs directly, which should be safe in this case, but
> is this an acceptable solution?

I'd rather extend see us ALTER AGGREGATE to do this.

> - Do you think we should add PARALLEL UNSAFE to the functions which we know
> are unsafe to make it obvious that it is intentional?

That seems likely unnecessary churn from here.

> - I have not added the parallel tags to the functions used by our procedural
> languages. Should we do so?

I don't think that accomplishes anything.

> - I have marked uuid-ossp, chkpass_in() and pgcrypto functions which
> generate random data as safe, despite that they depend on state in the
> backend. My reasoning is that, especially for the pgcrypto functions, that
> nobody should not rely on the PRNG state. For uuid-ossp I am on the fence.

random() is marked parallel-restricted because of setseed().  If
there's no equivalent for other random number generators then I think
they can be construed as safe.

> - I have touched a lot of legacy libraries, like tsearch2 and the spi/*
> stuff. Is that a good idea?

I don't know.  It doesn't seem particularly important, but I can't
immediately see a reason not to do it either.  You could argue it
might allow for better test coverage...

> - I decided to ignore that isn_weak() exists (and would make all input
> functions PARALLEL RESTRICTED) since it is only there is ISN_WEAK_MODE is
> defined. Is that ok?

That seems fine.

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



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Parallel safety tagging of extension functions
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: Is the unfair lwlock behavior intended?