Re: Bypassing cursors in postgres_fdw to enable parallel plans

From: Rafia Sabih <rafia(dot)pghackers(at)gmail(dot)com>
To: Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Yilin Zhang <jiezhilove(at)126(dot)com>, KENAN YILMAZ <kenan(dot)yilmaz(at)localus(dot)com(dot)tr>, Andy Fan <zhihuifan1213(at)163(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Bypassing cursors in postgres_fdw to enable parallel plans
Date: 2026-09-15 13:30:29
Message-ID: CA+FpmFfw3Hpjq66HDDJ3vRrLSMeQu8CmvKbiak+p9ZR5pmWqwA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

The patches required a minor rebase.
The latest patches attached.

On Thu, 3 Sept 2026 at 10:25, Rafia Sabih <rafia(dot)pghackers(at)gmail(dot)com> wrote:

>
>
> On Wed, 2 Sept 2026 at 21:14, Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>
> wrote:
>
>> On Wed, 2 Sept 2026 at 13:49, Rafia Sabih <rafia(dot)pghackers(at)gmail(dot)com>
>> wrote:
>> > Please find the reworked patchset in the attachment.
>> > Looking forward to your feedback on this one.
>>
>> I tried this patch out with the "postgres compatible" endpoint I built
>> for MotherDuck[1]. DuckDB (currently) doesn't support cursors, so that
>> is blocking us from supporting postgres_fdw. With this patchset (and a
>> few small bugfixes on my side) I was able to get it to work with
>> motherduck its postgres endpoint.
>>
>> [1]: https://motherduck.com/blog/motherduck-now-speaks-postgres/
>>
>> P.S. I did not review any of the code.
>>
> Interesting!
> Thank you for sharing this information. I am happy to see that the work is
> already useful.
>
> --
> Regards,
> Rafia Sabih
> CYBERTEC PostgreSQL International GmbH
>

--
Regards,
Rafia Sabih
CYBERTEC PostgreSQL International GmbH

Attachment Content-Type Size
v18-0002-postgres_fdw-Add-streaming_fetch-option-for-curs.patch application/octet-stream 163.0 KB
v18-0001-postgres_fdw-Rename-cursor_exists-flag-to-scan_i.patch application/octet-stream 4.0 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message vignesh C 2026-09-15 13:50:20 Re: Distinguish publication exclusions in object addresses
Previous Message Sami Imseih 2026-09-15 13:26:41 Re: Improve WAIT FOR read-your-writes consistency doc