| From: | Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com> |
|---|---|
| To: | Nikita Malakhov <hukutoc(at)gmail(dot)com> |
| Cc: | Jehan-Guillaume de Rorthais <jgdr(at)dalibo(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Re: [(known) BUG] DELETE/UPDATE more than one row in partitioned foreign table |
| Date: | 2026-06-05 11:59:17 |
| Message-ID: | CAPmGK14KEFMTuQ1vYwWCo8SLks5rXv-56K-V+XMy4q8uQJvq1w@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Mon, Jun 1, 2026 at 7:44 PM Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)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
| Attachment | Content-Type | Size |
|---|---|---|
| v3-0001-postgres_fdw-Disallow-UPDATE-DELETE-in-problematic-c.patch | application/octet-stream | 11.6 KB |
| v3-0002-postgres_fdw-Add-IMPORT-FOREIGN-SCHEMA-support-for-n.patch | application/octet-stream | 22.1 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Ilmar Yunusov | 2026-06-05 12:02:28 | Re: [Bug Report + Patch] File descriptor leak when io_method=io_uring |
| Previous Message | Fujii Masao | 2026-06-05 11:58:11 | Re: Deadlock detector fails to activate on a hot standby replica |