postgres_fdw: Minor improvement to postgresAcquireSampleRowsFunc

Started by Etsuro Fujitaalmost 7 years ago4 messageshackers
Jump to latest
#1Etsuro Fujita
fujita.etsuro@lab.ntt.co.jp

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.

Best regards,
Etsuro Fujita

Attachments:

postgresAcquireSampleRowsFunc.patchapplication/octet-stream; name=postgresAcquireSampleRowsFunc.patchDownload+34-29
#2Julien Rouhaud
rjuju123@gmail.com
In reply to: Etsuro Fujita (#1)
Re: postgres_fdw: Minor improvement to postgresAcquireSampleRowsFunc

On Fri, Jun 28, 2019 at 11:39 AM Etsuro Fujita <etsuro.fujita@gmail.com> 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 for removing that redundancy.

It all looks good to me! I marked it as ready for committer.

#3Etsuro Fujita
fujita.etsuro@lab.ntt.co.jp
In reply to: Julien Rouhaud (#2)
Re: postgres_fdw: Minor improvement to postgresAcquireSampleRowsFunc

Hi Julien,

On Fri, Jun 28, 2019 at 6:54 PM Julien Rouhaud <rjuju123@gmail.com> wrote:

On Fri, Jun 28, 2019 at 11:39 AM Etsuro Fujita <etsuro.fujita@gmail.com> 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 for removing that redundancy.

It all looks good to me! I marked it as ready for committer.

Cool! I'll commit the patch if there are no objections. Thanks for reviewing!

Best regards,
Etsuro Fujita

#4Etsuro Fujita
fujita.etsuro@lab.ntt.co.jp
In reply to: Etsuro Fujita (#3)
Re: postgres_fdw: Minor improvement to postgresAcquireSampleRowsFunc

On Fri, Jun 28, 2019 at 7:15 PM Etsuro Fujita <etsuro.fujita@gmail.com> wrote:

On Fri, Jun 28, 2019 at 6:54 PM Julien Rouhaud <rjuju123@gmail.com> wrote:

On Fri, Jun 28, 2019 at 11:39 AM Etsuro Fujita <etsuro.fujita@gmail.com> 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 for removing that redundancy.

It all looks good to me! I marked it as ready for committer.

Cool! I'll commit the patch if there are no objections. Thanks for reviewing!

Pushed.

Best regards,
Etsuro Fujita