Re: Shouldn't current_schema() be at least PARALLEL RESTRICTED?

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Shouldn't current_schema() be at least PARALLEL RESTRICTED?
Дата
Msg-id 20190119012052.GB3306@paquier.xyz
обсуждение исходный текст
Ответ на Re: Shouldn't current_schema() be at least PARALLEL RESTRICTED?  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On Fri, Jan 18, 2019 at 03:30:16PM -0500, Robert Haas wrote:
> It seems like, as currently implemented, the function is
> parallel-unsafe, because any inserts, updates, or deletes are
> currently parallel-unsafe, including insertions into catalogs.  But I
> am a bit confused why a function that is called current_schema() ends
> up creating a temps schema.

This is documented in namespace.c which needs tricks related to
search_path if referring directly to 'pg_temp', especially if the
namespace creation is marked as pending because its creation cannot
happen outside a transaction context, and the initialization
processing of search_path happens out of that.

Please let me suggest the attached patch then to switch the function
as parallel unsafe, for HEAD.  That still seems like the best way of
course for now after sleeping on it.

Thoughts?
--
Michael

Вложения

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

Предыдущее
От: Chapman Flack
Дата:
Сообщение: House style for DocBook documentation?
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: [HACKERS] REINDEX CONCURRENTLY 2.0