Обсуждение: BUG #16553: now() function marked PARALLEL RESTRICTED whereas transaction_timestamp() is PARALLEL SAFE

Поиск
Список
Период
Сортировка

BUG #16553: now() function marked PARALLEL RESTRICTED whereas transaction_timestamp() is PARALLEL SAFE

От
PG Bug reporting form
Дата:
The following bug has been logged on the website:

Bug reference:      16553
Logged by:          Giorgio Saviane
Email address:      gsaviane@gmail.com
PostgreSQL version: 11.8
Operating system:   Linux
Description:

now() and transaction_timestamp() are described as being equivalent in the
guide
https://www.postgresql.org/docs/11/functions-datetime.html#FUNCTIONS-DATETIME-CURRENT.
However, using now() in a query can screw up a possible parallel plan since
it's labeled PARALLEL RESTRICTED.


PG Bug reporting form <noreply@postgresql.org> writes:
> now() and transaction_timestamp() are described as being equivalent in the
> guide
> https://www.postgresql.org/docs/11/functions-datetime.html#FUNCTIONS-DATETIME-CURRENT.
> However, using now() in a query can screw up a possible parallel plan since
> it's labeled PARALLEL RESTRICTED.

This is fixed in v12 and later, cf

https://git.postgresql.org/gitweb/?p=postgresql.git&a=commitdiff&h=07ee62ce9

            regards, tom lane