Re: [POC] FETCH limited by bytes.

From: Corey Huinker <corey(dot)huinker(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Matt Kelly <mkellycs(at)gmail(dot)com>, Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>
Subject: Re: [POC] FETCH limited by bytes.
Date: 2016-01-25 18:21:20
Message-ID: CADkLM=cSKP1fqRMJVitbgWa7LKQZAoQTAnK05iiZv1osrmaUWQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>
>
> Review:
>
> - There is an established idiom in postgres_fdw for how to extract
> data from lists of DefElems, and this patch does something else
> instead. Please make it look like postgresIsForeignRelUpdatable,
> postgresGetForeignRelSize, and postgresImportForeignSchema instead of
> inventing something new. (Note that your approach would require
> multiple passes over the list if you needed information on multiple
> options, whereas the existing approach does not.)
>

I will look into that. The original patch pre-dates import foreign schema,
so I'm not surprised that I missed the established pattern.

>
> - I think the comment in InitPgFdwOptions() could be reduced to a
> one-line comment similar to those already present.
>

Aye.

> - I would reduce the debug level on the fetch command to something
> lower than DEBUG1, or drop it entirely. If you keep it, you need to
> fix the formatting so that the line breaks look like other ereport()
> calls.
>

As I mentioned, I plan to drop it entirely. It was only there to show a
reviewer that it works as advertised. There's not much to see without it.

> - We could consider folding fetch_size into "Remote Execution
> Options", but maybe that's too clever.
>

If you care to explain, I'm listening. Otherwise I'm going forward with the
other suggestions you've made.

>
> I would not worry about trying to get this into the regression tests.
>
>
Happy to hear that.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2016-01-25 18:57:21 Re: count_nulls(VARIADIC "any")
Previous Message Andres Freund 2016-01-25 18:07:11 Re: 2016-01 Commitfest