Re: pg_config wrongly marked as not parallel safe?

Поиск
Список
Период
Сортировка
От Laurenz Albe
Тема Re: pg_config wrongly marked as not parallel safe?
Дата
Msg-id 8dcb0bb248e9aaef0f1ef0faa27ab583bfa5bb84.camel@cybertec.at
обсуждение исходный текст
Ответ на Re: pg_config wrongly marked as not parallel safe?  (Stephen Frost <sfrost@snowman.net>)
Ответы Re: pg_config wrongly marked as not parallel safe?  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
Список pgsql-hackers
On Mon, 2018-11-26 at 19:51 -0500, Stephen Frost wrote:
> If a function's results can change across minor or major versions, we
> shouldn't be marking it as immutable because, by definition, it's not
> immutable.
> 
> We, today, have a baked in assumption that any function marked as
> immutable will remain immutable across all major versions that we allow
> indexes to be retained through, which is all of them since about 8.3 at
> this point.
> 
> We absolutely need a policy that if you decide to change the results of
> some immutable function across a major version change, you need to
> consider the results on indexes and possibly write into pg_upgrade
> checks to try and detect any usage of that immutable function.  I hope
> we're in agreement there.

It's hard to make a guarantee that a function will never change in the
future.  What if we fix some rounding or overflow problem in a floating
point function?

If we went that far, hardly any function could be IMMUTABLE.

I think it is best to use IMMUTABLE whenever we don't expect it to
change and it is a function useful for indexes, and if it happens to
change nonetheless, write into the release notes that certain indexes
have to be rebuilt after upgrade.

Of course, there is no problem to mark pg_config as stable, because
there is little chance it will be used in an index anyway.

Yours,
Laurenz Albe



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: IMMUTABLE and PARALLEL SAFE function markings
Следующее
От: Amit Langote
Дата:
Сообщение: Re: Pluggable Storage - Andres's take