From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Vik Fearing <vik(dot)fearing(at)2ndquadrant(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>, Andres Freund <andres(at)anarazel(dot)de>, gajus(at)gajus(dot)com, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: IMMUTABLE and PARALLEL SAFE function markings |
Date: | 2018-11-27 04:26:32 |
Message-ID: | CA+TgmoYT5jOD0mC2jsdBCWG4yabhUKRCh_7Wopo6S1FZQkwC+A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Nov 26, 2018 at 11:20 PM Andrew Gierth
<andrew(at)tao11(dot)riddles(dot)org(dot)uk> wrote:
> But the combination of inlining and polymorphism, in particular, makes
> it impossible for the function author to know this. Take the OP's
> example; it is parallel safe if and only if the selected type's equal
> function is parallel safe - how is the author supposed to know? What if
> the type is one installed later?
I think you have to set it conservatively. It's easy to construct all
kinds of cases where a function is sometimes parallel-safe and
sometimes not depending on the parameters passed to it, but we don't
have any way to indicate that right now -- and I'm not entirely
convinced that we need one.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Gierth | 2018-11-27 04:31:19 | Re: IMMUTABLE and PARALLEL SAFE function markings |
Previous Message | Tom Lane | 2018-11-27 04:21:42 | Re: IMMUTABLE and PARALLEL SAFE function markings |