From: | Tomas Vondra <tomas(at)vondra(dot)me> |
---|---|
To: | Önder Kalacı <onderkalaci(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
Cc: | Matheus Alcantara <matheusssilv97(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Allow FDW extensions to support MERGE command via CustomScan |
Date: | 2024-12-13 15:33:46 |
Message-ID: | 4b27f368-d6b8-48f1-8efd-7ee3e0152df5@vondra.me |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 12/13/24 16:03, Önder Kalacı wrote:
> Hi Alvaro, all
>
>> IMO this is a bad plan. It'll become _the_ way to run MERGE on foreign
>> tables, which will become a selling point for proprietary FDWs, and
>> nobody will be motivated to write the code to implement the long-term
>> plan you were describing.
>>
>> In short, -1 from me.
>>
>
> I see your point, but this seems like an artificial limitation in
> Postgres. The parser usually doesn’t impose such restrictions, so it’s
> hard to understand why FDWs should be treated differently. If someone
> really wanted to work around this today, they could hack Postgres and
> avoid the limitation anyway.
>
> Our goal here is to follow the spirit of custom scans: enable
> experimentation and see what works. This approach doesn’t close the door
> to a more complete, native implementation later—it just creates a more
> natural path forward in the meantime.
>
If you want to experiment during development, you can easily do that on
a local fork. I think that's fine.
But if we're expected to support such change, we'd need a way to test
it, which most likely means it'd need postgres_fdw to support it. And
I'd guess adding that would be roughly comparable to actually adding the
"proper" MERGE planning into PlanForeignModify.
So in short, I agree with Álvaro.
regards
--
Tomas Vondra
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Dunstan | 2024-12-13 15:35:02 | Re: OLEDB provider for PostgreSQL |
Previous Message | Tom Lane | 2024-12-13 15:30:22 | Re: Recovering from detoast-related catcache invalidations |