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

Started by PG Bug reporting formover 5 years ago2 messagesbugs
Jump to latest
#1PG Bug reporting form
noreply@postgresql.org

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.

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: PG Bug reporting form (#1)
Re: BUG #16553: now() function marked PARALLEL RESTRICTED whereas transaction_timestamp() is PARALLEL SAFE

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&amp;a=commitdiff&amp;h=07ee62ce9

regards, tom lane