Re: Accidentally parallel unsafe functions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Andreas Karlsson <andreas(at)proxel(dot)se>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Accidentally parallel unsafe functions
Date: 2016-04-29 23:19:46
Message-ID: 26804.1461971986@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> writes:
> Andreas Karlsson wrote:
>> I am currently looking into adding the correct parallel options to all
>> functions in the extensions and I noticed that some built-in functions seems
>> to have been marked as unsafe by accident. The main culprit is
>> system_views.sql which redefines these functions and removes the parallel
>> safe flag.

> Surely CREATE OR REPLACE should keep whatever the flag was, rather than
> ovewrite it with a bogus value if not specified? In other words IMO the
> CREATE OR REPLACE code needs changing, not system_views.sql.

Absolutely not! The definition of CREATE OR REPLACE is that at the end,
the state of the object is predictable from only what the command says.
This is not open for renegotiation.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David G. Johnston 2016-04-29 23:31:31 Re: Accidentally parallel unsafe functions
Previous Message Alvaro Herrera 2016-04-29 23:12:45 Re: Accidentally parallel unsafe functions