Re: postgres_fdw: Minor improvement to postgresAcquireSampleRowsFunc

2019-07-03 Thread Etsuro Fujita
On Fri, Jun 28, 2019 at 7:15 PM Etsuro Fujita wrote: > On Fri, Jun 28, 2019 at 6:54 PM Julien Rouhaud wrote: > > On Fri, Jun 28, 2019 at 11:39 AM Etsuro Fujita > > wrote: > > > In postgresAcquireSampleRowsFunc, we 1) determine the fetch size and > > > then 2) construct the fetch command in

Re: postgres_fdw: Minor improvement to postgresAcquireSampleRowsFunc

2019-06-28 Thread Etsuro Fujita
Hi Julien, On Fri, Jun 28, 2019 at 6:54 PM Julien Rouhaud wrote: > On Fri, Jun 28, 2019 at 11:39 AM Etsuro Fujita > wrote: > > In postgresAcquireSampleRowsFunc, we 1) determine the fetch size and > > then 2) construct the fetch command in each iteration of fetching some > > rows from the

Re: postgres_fdw: Minor improvement to postgresAcquireSampleRowsFunc

2019-06-28 Thread Julien Rouhaud
On Fri, Jun 28, 2019 at 11:39 AM Etsuro Fujita wrote: > > In postgresAcquireSampleRowsFunc, we 1) determine the fetch size and > then 2) construct the fetch command in each iteration of fetching some > rows from the remote, but that would be totally redundant. Indeed. > Attached > is a patch

postgres_fdw: Minor improvement to postgresAcquireSampleRowsFunc

2019-06-28 Thread Etsuro Fujita
Hi, In postgresAcquireSampleRowsFunc, we 1) determine the fetch size and then 2) construct the fetch command in each iteration of fetching some rows from the remote, but that would be totally redundant. Attached is a patch for removing that redundancy. I'll add this to the upcoming commitfest.