From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> |
Cc: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Andres Freund <andres(at)2ndquadrant(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: parallel mode and parallel contexts |
Date: | 2015-04-28 18:40:04 |
Message-ID: | CA+TgmobgUA+Us6_UbkyENhQRJtmq6r02u3AQFi_+w3hNtbqccA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sun, Apr 26, 2015 at 9:57 PM, Amit Langote
<Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> wrote:
> On 2015-04-22 AM 04:14, Robert Haas wrote:
>> We should check IsParallelWorker() for operations that are allowed in
>> the master during parallel mode, but not allowed in the workers - e.g.
>> the master can scan its own temporary relations, but its workers
>> can't. We should check IsInParallelMode() for operations that are
>> completely off-limits in parallel mode - i.e. writes.
>>
>> We use ereport() where we expect that SQL could hit that check, and
>> elog() where we expect that only (buggy?) C code could hit that check.
>>
>
> By the way, perhaps orthogonal to the basic issue Alvaro and you are
> discussing here - when playing around with (parallel-mode + parallel-safety +
> parallel heapscan + parallel seqscan), I'd observed (been a while since) that
> if you run a CREATE TABLE AS ... SELECT and the SELECT happens to use parallel
> scan, the statement as a whole fails because the top level statement (CTAS) is
> not read-only. So, only way to make CTAS succeed is to disable seqscan; which
> may require some considerations in reporting to user to figure out. I guess it
> happens because the would-be parallel leader of the scan would also be the one
> doing DefineRelation() DDL. Apologies if this has been addressed since.
That sounds like a bug in the assess-parallel-safety patch.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2015-04-28 18:44:24 | Re: Feedback on getting rid of VACUUM FULL |
Previous Message | Robert Haas | 2015-04-28 18:38:42 | Re: parallel mode and parallel contexts |