postgres_fdw: Minor improvement to postgresAcquireSampleRowsFunc

Etsuro Fujita <etsuro.fujita@gmail.com>

From: Etsuro Fujita <etsuro.fujita@gmail.com>
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2019-06-28T09:38:51Z
Lists: pgsql-hackers

Attachments

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

Commits

  1. postgres_fdw: Remove redundancy in postgresAcquireSampleRowsFunc().