Re: [(known) BUG] DELETE/UPDATE more than one row in partitioned foreign table
Etsuro Fujita <etsuro.fujita@gmail.com>
From: Etsuro Fujita <etsuro.fujita@gmail.com>
To: Nikita Malakhov <hukutoc@gmail.com>
Cc: Jehan-Guillaume de Rorthais <jgdr@dalibo.com>,
pgsql-hackers@lists.postgresql.org
Date: 2026-06-05T11:59:17Z
Lists: pgsql-hackers
Attachments
- v3-0001-postgres_fdw-Disallow-UPDATE-DELETE-in-problematic-c.patch (application/octet-stream) patch v3-0001
- v3-0002-postgres_fdw-Add-IMPORT-FOREIGN-SCHEMA-support-for-n.patch (application/octet-stream) patch v3-0002
On Mon, Jun 1, 2026 at 7:44 PM Etsuro Fujita <etsuro.fujita@gmail.com> wrote: > I think we should first work on a back-patchable solution. So I'd > like to re-propose the patch that I proposed in this thread before to > disallow UPDATE/DELETE in problematic cases [1]. Attached is a new > version of the patch. Changes are: > > * Renamed the new table option inherited to remotely_inherited, to > avoid confusion with local inheritance. > * Moved the logic to prevent problematic UPDATE/DELETE from a planner > function to an executor function, to avoid throwing an error > unnecessarily when there are no target rows to update/delete. > * Added docs to postgres-fdw.sgml. > > I'm planning to add the postgresImportForeignSchema() support in the > next version. I created the patch to add that support on top of the patch I sent in a previous email, which I'm attaching along with the base patch. It's the same as before, except that I fixed a typo in docs pointed out by Michael-san off-list. Comments welcome! Best regards, Etsuro Fujita