Re: postgres_fdw: Minor improvement to postgresAcquireSampleRowsFunc

Julien Rouhaud <rjuju123@gmail.com>

From: Julien Rouhaud <rjuju123@gmail.com>
To: Etsuro Fujita <etsuro.fujita@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2019-06-28T09:54:34Z
Lists: pgsql-hackers
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.



Commits

  1. postgres_fdw: Remove redundancy in postgresAcquireSampleRowsFunc().