Re: [HACKERS] utility commands benefiting from parallel plan - Mailing list pgsql-hackers

From Robert Haas
Subject Re: [HACKERS] utility commands benefiting from parallel plan
Date
Msg-id CA+TgmoaO=QQTpHw6SxtxzjTuUPM3eXLc=Eo_OoUuL-UotKgSBA@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] utility commands benefiting from parallel plan  (Haribabu Kommi <kommi.haribabu@gmail.com>)
Responses Re: [HACKERS] utility commands benefiting from parallel plan
List pgsql-hackers
On Fri, Sep 15, 2017 at 2:22 AM, Haribabu Kommi
<kommi.haribabu@gmail.com> wrote:
> Thanks for the review.

I committed this patch with some cosmetic changes.  I think the fact
that several people have asked for this indicates that, even without
making some of the more complicated cases work, this has some value.
I am not convinced it is safe in any case other than when the DML
command is both creating and populating the table, so I removed
REFRESH MATERIALIZED VIEW support from the patch and worked over the
documentation and comments to a degree.

The problem with a case like REFRESH MATERIALIZED VIEW is that there's
nothing to prevent something that gets run in the course of the query
from trying to access the view (and the heavyweight lock won't prevent
that, due to group locking).  That's probably a stupid thing to do,
but it can't be allowed to break the world.  The other cases are safe
from that particular problem because the table doesn't exist yet.

I am still slightly nervous that there may be some other problem that
none of us have thought about that makes this unsafe, but we still
have quite a while until 11 goes out the door, so if there is such a
problem, maybe someone else will find it now that this is committed
and more likely to get some attention.  I thought about not committing
this just in case such a problem exists, but that seemed too timid: if
we never commit anything that might have an undetected bug, we'll
never commit anything at all.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: [HACKERS] Parallel Append implementation
Next
From: Nico Williams
Date:
Subject: Re: [HACKERS] [PATCH] Add ALWAYS DEFERRED option for constraints