Re: postgres_fdw join pushdown (was Re: Custom/Foreign-Join-APIs)

From: Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Thom Brown <thom(at)linux(dot)com>, Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp>, "pgsql-hackers(at)postgreSQL(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Kouhei Kaigai <kaigai(at)ak(dot)jp(dot)nec(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Shigeru Hanada <shigeru(dot)hanada(at)gmail(dot)com>
Subject: Re: postgres_fdw join pushdown (was Re: Custom/Foreign-Join-APIs)
Date: 2016-02-05 09:23:17
Message-ID: CAFjFpReA1Kh7d=aL9R1zstAJhVjQUDvZ3YdDhN0J1KjiO446JA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Feb 5, 2016 at 9:03 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:

> On Thu, Feb 4, 2016 at 11:55 AM, Ashutosh Bapat
> <ashutosh(dot)bapat(at)enterprisedb(dot)com> wrote:
> > A query with FOR UPDATE/SHARE will be considered parallel unsafe in
> > has_parallel_hazard_walker() and root->glob->parallelModeOK will be
> marked
> > false. This implies that none of the base relations and hence join
> relations
> > will be marked as consider_parallel. IIUC your logic, none of the queries
> > with FOR UPDATE/SHARE will get a local path which is marked parallel_safe
> > and thus join will not be pushed down. Why do you think we need to skip
> > paths that aren't parallel_safe? I have left aside this change in the
> latest
> > patches.
>
> I changed this back before committing but, ah nuts, you're right. Sigh.
> Sorry.
>
>
I have corrected this in this set of patches. Also, I have included the
change to build the join relation description while constructing fpinfo in
the main patch since that avoids repeated building of the same at a small
cost of constructing relation name for base relations, which goes waste if
that relation is not going to be part of any pushable join tree.

Ran pgindent as well.

--
Best Wishes,
Ashutosh Bapat
EnterpriseDB Corporation
The Postgres Database Company

Attachment Content-Type Size
pg_fdw_core_v9.patch text/plain 2.2 KB
pg_fdw_join_v9.patch text/plain 136.6 KB
pg_join_pd_v9.patch text/plain 167.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2016-02-05 09:40:59 Re: silent data loss with ext4 / all current versions
Previous Message Masahiko Sawada 2016-02-05 09:19:24 Re: Support for N synchronous standby servers - take 2