Re: Append with naive multiplexing of FDWs - Mailing list pgsql-hackers

From Kyotaro Horiguchi
Subject Re: Append with naive multiplexing of FDWs
Date
Msg-id 20200116.155002.263144408387928025.horikyota.ntt@gmail.com
Whole thread Raw
In response to Re: Append with naive multiplexing of FDWs  (Bruce Momjian <bruce@momjian.us>)
Responses Re: Append with naive multiplexing of FDWs  (Movead Li <movead.li@highgo.ca>)
List pgsql-hackers
Thank you very much for the testing of the patch, Ahsan!

At Wed, 15 Jan 2020 15:41:04 -0500, Bruce Momjian <bruce@momjian.us> wrote in 
> On Tue, Jan 14, 2020 at 02:37:48PM +0500, Ahsan Hadi wrote:
> > Summary
> > The patch is pretty good, it works well when there were little data back to
> > the parent node. The patch doesn’t provide parallel FDW scan, it ensures
> > that child nodes can send data to parent in parallel but the parent can only
> > sequennly process the data from data nodes.

"Parallel scan" at the moment means multiple workers fetch unique
blocks from *one* table in an arbitrated manner. In this sense
"parallel FDW scan" means multiple local workers fetch unique bundles
of tuples from *one* foreign table, which means it is running on a
single session.  That doesn't offer an advantage.

If parallel query processing worked in worker-per-table mode,
especially on partitioned tables, maybe the current FDW would work
without much of modification. But I believe asynchronous append on
foreign tables on a single process is far resource-effective and
moderately faster than parallel append.

> > Providing there is no performance degrdation for non FDW append queries,
> > I would recomend to consider this patch as an interim soluton while we are
> > waiting for parallel FDW scan.
> 
> Wow, these are very impressive results!

Thanks.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: SlabCheck leaks memory into TopMemoryContext
Next
From: Konstantin Knizhnik
Date:
Subject: Re: [Proposal] Global temporary tables