Re: asynchronous execution

From: Corey Huinker <corey(dot)huinker(at)gmail(dot)com>
To: Antonin Houska <ah(at)cybertec(dot)at>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: asynchronous execution
Date: 2017-02-07 00:36:33
Message-ID: CADkLM=fuvVdKvz92XpCRnb4=rj6bLOhSLifQ3RV=Sb4Q5rJsRA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Feb 3, 2017 at 5:04 AM, Antonin Houska <ah(at)cybertec(dot)at> wrote:

> Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp> wrote:
>
> > I noticed that this patch is conflicting with 665d1fa (Logical
> > replication) so I rebased this. Only executor/Makefile
> > conflicted.
>
> I was lucky enough to see an infinite loop when using this patch, which I
> fixed by this change:
>
> diff --git a/src/backend/executor/execAsync.c
> b/src/backend/executor/execAsync.c
> new file mode 100644
> index 588ba18..9b87fbd
> *** a/src/backend/executor/execAsync.c
> --- b/src/backend/executor/execAsync.c
> *************** ExecAsyncEventWait(EState *estate, long
> *** 364,369 ****
> --- 364,370 ----
>
> if ((w->events & WL_LATCH_SET) != 0)
> {
> + ResetLatch(MyLatch);
> process_latch_set = true;
> continue;
> }

Hi, I've been testing this patch because seemed like it would help a use
case of mine, but can't tell if it's currently working for cases other than
a local parent table that has many child partitions which happen to be
foreign tables. Is it? I was hoping to use it for a case like:

select x, sum(y) from one_remote_table
union all
select x, sum(y) from another_remote_table
union all
select x, sum(y) from a_third_remote_table

but while aggregates do appear to be pushed down, it seems that the remote
tables are being queried in sequence. Am I doing something wrong?

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2017-02-07 00:38:14 Re: multivariate statistics (v19)
Previous Message Michael Paquier 2017-02-07 00:00:02 Re: IF [NOT] EXISTS for replication slots