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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

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

apt.postgresql.org Repository Update
The following bug has been logged on the website:

Bug reference:      16553
Logged by:          Giorgio Saviane
Email address:      [hidden email]
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.

Reply | Threaded
Open this post in threaded view
|

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

Tom Lane-2
PG Bug reporting form <[hidden email]> 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