From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Missed parallelism option in plpgsql? |
Date: | 2017-12-20 20:07:58 |
Message-ID: | CA+TgmoZOJWqOX3ZrgM_Lv7dP=KR29wxAMVLyo517mCvdWM_0XA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Dec 20, 2017 at 2:26 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> I happened to notice that while writing this in plpgsql
> will consider a parallel plan:
>
> select count(*) into s from tenk1 where ten = x;
>
> writing this will not:
>
> s := count(*) from tenk1 where ten = x;
>
> Is that intentional? Seems to me these cases ought to be
> treated the same.
>
> The reason for it is that exec_assign_expr's call of
> exec_prepare_plan does not specify CURSOR_OPT_PARALLEL_OK.
Hmm, I think I didn't realize that you could include a "from" clause
in an assignment statement. I assumed it would just be a simple
expression getting evaluated, which wouldn't make sense to do in
parallel.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2017-12-20 20:11:30 | Re: Tracking of page changes for backup purposes. PTRACK [POC] |
Previous Message | Alvaro Herrera | 2017-12-20 19:49:37 | Re: [HACKERS] Proposal: Local indexes for partitioned table |