pg_config wrongly marked as not parallel safe?

Поиск
Список
Период
Сортировка
От Andres Freund
Тема pg_config wrongly marked as not parallel safe?
Дата
Msg-id 20181126234521.rh3grz7aavx2ubjv@alap3.anarazel.de
обсуждение исходный текст
Ответы Re: pg_config wrongly marked as not parallel safe?  (Joe Conway <mail@joeconway.com>)
Список pgsql-hackers
Hi,

Triggered by the thread at [1] I looked for functions marked as
immutable but not parallel safe.

postgres[19492][1]=# SELECT oid::regprocedure, provolatile, proparallel FROM pg_proc WHERE provolatile = 'i' AND
proparallel!= 's';
 
┌─────────────┬─────────────┬─────────────┐
│     oid     │ provolatile │ proparallel │
├─────────────┼─────────────┼─────────────┤
│ pg_config() │ i           │ r           │
└─────────────┴─────────────┴─────────────┘
(1 row)

# pg_config
{ oid => '3400', descr => 'pg_config binary as a function',
  proname => 'pg_config', prorows => '23', proretset => 't', proparallel => 'r',
  prorettype => 'record', proargtypes => '', proallargtypes => '{text,text}',
  proargmodes => '{o,o}', proargnames => '{name,setting}',
  prosrc => 'pg_config' },

so that function is marked as immutable but not parallel safe, without
an explanation for that odd combination.

Now obviously I don't think it practially matters for pg_config(), but
it seems unnecessarily confusing as a general matter.

I think we probably should fix this specific case, and then add a check
to opr_sanity.sql or such.

As far as I can tell pg_config() was marked as such since its addition
in [2]. Joe, I assume this wasn't intentional?

Greetings,

Andres Freund

[1] https://www.postgresql.org/message-id/CA+6d-n4dOakgLu2gsTfk9uD2CC9ueNCg+z_mnXA2-=Qaod1Wuw@mail.gmail.com
[2] http://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=a5c43b886942e96ec5c745041f2d6a50c3205147


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

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