Re: Two proposed modifications to the PostgreSQL FDW

2018-08-29 Thread Etsuro Fujita
(2018/08/21 16:03), Amit Langote wrote: On 2018/08/20 23:43, Tom Lane wrote: Chris Travers writes: I am looking at trying to make two modifications to the PostgreSQL FDW and would like feedback on this before I do. 1. INSERTMETHOD=[insert|copy] option on foreign table. One significant

Re: Two proposed modifications to the PostgreSQL FDW

2018-08-22 Thread Masahiko Sawada
On Wed, Aug 22, 2018 at 5:13 PM Chris Travers wrote: > > > > On Wed, Aug 22, 2018 at 9:09 AM Masahiko Sawada wrote: >> >> On Wed, Aug 22, 2018 at 1:20 PM Chris Travers >> wrote: >> > The two things I would suggest is that rather than auto-detecting (if I >> > understand your patch correctly)

Re: Two proposed modifications to the PostgreSQL FDW

2018-08-22 Thread Chris Travers
On Wed, Aug 22, 2018 at 9:09 AM Masahiko Sawada wrote: > On Wed, Aug 22, 2018 at 1:20 PM Chris Travers > wrote: > > The two things I would suggest is that rather than auto-detecting (if I > understand your patch correctly) whether prepared transactions are possible > on the other system, making

Re: Two proposed modifications to the PostgreSQL FDW

2018-08-22 Thread Masahiko Sawada
On Wed, Aug 22, 2018 at 1:20 PM Chris Travers wrote: > > > > On Wed, Aug 22, 2018 at 3:12 AM Masahiko Sawada wrote: >> >> On Tue, Aug 21, 2018 at 5:36 PM Chris Travers >> wrote: >> > >> > >> > >> > On Tue, Aug 21, 2018 at 8:42 AM Masahiko Sawada >> > wrote: >> >> >> >> On Tue, Aug 21, 2018

Re: Two proposed modifications to the PostgreSQL FDW

2018-08-21 Thread Chris Travers
On Wed, Aug 22, 2018 at 3:12 AM Masahiko Sawada wrote: > On Tue, Aug 21, 2018 at 5:36 PM Chris Travers > wrote: > > > > > > > > On Tue, Aug 21, 2018 at 8:42 AM Masahiko Sawada > wrote: > >> > >> On Tue, Aug 21, 2018 at 1:47 AM Chris Travers > wrote: > >> > > >> > > >> > > >> > On Mon, Aug 20,

Re: Two proposed modifications to the PostgreSQL FDW

2018-08-21 Thread Masahiko Sawada
On Tue, Aug 21, 2018 at 5:36 PM Chris Travers wrote: > > > > On Tue, Aug 21, 2018 at 8:42 AM Masahiko Sawada wrote: >> >> On Tue, Aug 21, 2018 at 1:47 AM Chris Travers >> wrote: >> > >> > >> > >> > On Mon, Aug 20, 2018 at 4:41 PM Andres Freund wrote: >> >> >> >> Hi, >> >> >> >> On 2018-08-20

Re: Two proposed modifications to the PostgreSQL FDW

2018-08-21 Thread Chris Travers
On Mon, Aug 20, 2018 at 4:44 PM Tom Lane wrote: > Chris Travers writes: > > I am looking at trying to make two modifications to the PostgreSQL FDW > and > > would like feedback on this before I do. > > > 1. INSERTMETHOD=[insert|copy] option on foreign table. > > > One significant limitation of

Re: Two proposed modifications to the PostgreSQL FDW

2018-08-21 Thread Chris Travers
On Tue, Aug 21, 2018 at 8:42 AM Masahiko Sawada wrote: > On Tue, Aug 21, 2018 at 1:47 AM Chris Travers > wrote: > > > > > > > > On Mon, Aug 20, 2018 at 4:41 PM Andres Freund > wrote: > >> > >> Hi, > >> > >> On 2018-08-20 16:28:01 +0200, Chris Travers wrote: > >> > 2. TWOPHASECOMMIT=[off|on]

Re: Two proposed modifications to the PostgreSQL FDW

2018-08-21 Thread Amit Langote
On 2018/08/20 23:43, Tom Lane wrote: > Chris Travers writes: >> I am looking at trying to make two modifications to the PostgreSQL FDW and >> would like feedback on this before I do. > >> 1. INSERTMETHOD=[insert|copy] option on foreign table. > >> One significant limitation of the PostgreSQL

Re: Two proposed modifications to the PostgreSQL FDW

2018-08-21 Thread Masahiko Sawada
On Tue, Aug 21, 2018 at 1:47 AM Chris Travers wrote: > > > > On Mon, Aug 20, 2018 at 4:41 PM Andres Freund wrote: >> >> Hi, >> >> On 2018-08-20 16:28:01 +0200, Chris Travers wrote: >> > 2. TWOPHASECOMMIT=[off|on] option >> >> > The second major issue that I see with PostgreSQL's foreign

Re: Two proposed modifications to the PostgreSQL FDW

2018-08-20 Thread Chris Travers
For the record, here's the proof of concept code for the transaction manager which works off libpq connections. It is not ready yet by any means. But it is included for design discussion. If the previous patch gets in instead, that's fine, but figure it is worth including here for discussion

Re: Two proposed modifications to the PostgreSQL FDW

2018-08-20 Thread Chris Travers
On Mon, Aug 20, 2018 at 4:41 PM Andres Freund wrote: > Hi, > > On 2018-08-20 16:28:01 +0200, Chris Travers wrote: > > 1. INSERTMETHOD=[insert|copy] option on foreign table. > > > > One significant limitation of the PostgreSQL FDW is that it does a > prepared > > statement insert on each row

Re: Two proposed modifications to the PostgreSQL FDW

2018-08-20 Thread Andres Freund
Hi, On 2018-08-20 10:56:39 -0400, Stephen Frost wrote: > * Andres Freund (and...@anarazel.de) wrote: > > On 2018-08-20 16:28:01 +0200, Chris Travers wrote: > > > 1. INSERTMETHOD=[insert|copy] option on foreign table. > > > > > > One significant limitation of the PostgreSQL FDW is that it does a

Re: Two proposed modifications to the PostgreSQL FDW

2018-08-20 Thread Stephen Frost
Greetings, * Andres Freund (and...@anarazel.de) wrote: > On 2018-08-20 16:28:01 +0200, Chris Travers wrote: > > 1. INSERTMETHOD=[insert|copy] option on foreign table. > > > > One significant limitation of the PostgreSQL FDW is that it does a prepared > > statement insert on each row written

Re: Two proposed modifications to the PostgreSQL FDW

2018-08-20 Thread Tom Lane
Chris Travers writes: > I am looking at trying to make two modifications to the PostgreSQL FDW and > would like feedback on this before I do. > 1. INSERTMETHOD=[insert|copy] option on foreign table. > One significant limitation of the PostgreSQL FDW is that it does a prepared > statement

Re: Two proposed modifications to the PostgreSQL FDW

2018-08-20 Thread Andres Freund
Hi, On 2018-08-20 16:28:01 +0200, Chris Travers wrote: > 1. INSERTMETHOD=[insert|copy] option on foreign table. > > One significant limitation of the PostgreSQL FDW is that it does a prepared > statement insert on each row written which imposes a per-row latency. This > hits environments where

Two proposed modifications to the PostgreSQL FDW

2018-08-20 Thread Chris Travers
Hi all; I am looking at trying to make two modifications to the PostgreSQL FDW and would like feedback on this before I do. 1. INSERTMETHOD=[insert|copy] option on foreign table. One significant limitation of the PostgreSQL FDW is that it does a prepared statement insert on each row written