Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wVxiI-002Ink-1G for pgsql-hackers@arkaria.postgresql.org; Sat, 06 Jun 2026 20:33:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wVxiH-00GWlG-10 for pgsql-hackers@arkaria.postgresql.org; Sat, 06 Jun 2026 20:33:49 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wVxiG-00GWl8-2w for pgsql-hackers@lists.postgresql.org; Sat, 06 Jun 2026 20:33:49 +0000 Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wVxiF-00000001RUM-0EPL for pgsql-hackers@lists.postgresql.org; Sat, 06 Jun 2026 20:33:48 +0000 Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-bec449d57bfso39077766b.3 for ; Sat, 06 Jun 2026 13:33:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1780778025; cv=none; d=google.com; s=arc-20240605; b=kNl3TTGxkLROKs6OFJj+YEnJ3aOysjZm/dV9kQh1Kc457Xw30HOZ6obHfMEIrMpKUA LSePVleQi7golTI5GRsN7BMW0W3RExpshlWpmuh3SIBFZfqsFYNGtq4A7Z5VYg+/SI5+ Mgpfu/oU8ADhRQ7/uQJiRNau9qjJaXQQLgG+58TO5cihGLzY9NdRkXsiuNHJ5yumrST4 I8KqgFH/RsPGAfEzUBpoz3hxhZXIEBxcpjjHy6nj6z3yvSQk5i3u3ya58Nnk8AppPt3F i1KOvsEmenfbQm/kvrvHoTpLrBhnUH1zfEC2CxPxg24lEjdcEVn+csWxmo3DgyHPwkpz GE8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=ZHVb0JXWIyIDW0d0k8JHhDfKYTZ3FFfIGP6ycxqe/WM=; fh=uBec44h7LO6TikZ5Jatpcec8ca/uU3p71Zk1zkbCXXw=; b=XQwzgW8c4nXgGbc8pTZyrIQioQcvHYlG/di1jb3mE3C/8gEAKuoVYTp5uOIpVPeUK6 GTUEXTdztNmhSWi00lmN1Crp4dGix+aFPVphFot6gbaxaDdjEo64SwaMLev4Z0HKqhP1 p4iBylUxz+guniUEDiPqMwD7YJbG8ddYpzFQHpT8YSlMVXNpZrXt8670xp/zReKkFq4g 0X2QuKCvMT8TYf0P62w2SXVbBM26vsgRtgEYS9NNLBKnqIo135qN7q05LqDY/W4sGld0 +jFe4gMM3JkIGaDyB5cBqwLjCxu2bf/eUstKIa6f2qTt9Lu5oTH7dasxGgs1+XAVXd92 yFSw==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1780778025; x=1781382825; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=ZHVb0JXWIyIDW0d0k8JHhDfKYTZ3FFfIGP6ycxqe/WM=; b=NbwTzlym0QyGmFHDKh+N3S7J+n60ncb7Z8CZjeFjn+Pzt2QpqNfz7ZVSCq+5CYjoB0 RPdZbn5uAU3ic7n0P2skQiw7vhl4FlYKMU2Zf2aS/fETNwdNCx+hyEFG3UfXSEjNLgUa nOGlK6r0qKZOK9TCDBR3rc7z3kRSSltnjkKQCtOET02sCQ7sx94rZYfcOlnHgzqQPtbN GL+ETfww0kWwnQWasU4VZJtCcWJqunMFi6DNFb7L49MfVqk/QkTUA416DhwuMQix1CHN omHQZFG4Ba20fBiAC4dlHopm6rFaVnXoYtWE/v0U8OZnK1JpQ2vbgdfVjr1WXhCIrXbf WB0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780778025; x=1781382825; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ZHVb0JXWIyIDW0d0k8JHhDfKYTZ3FFfIGP6ycxqe/WM=; b=K4+iIIDDObqPpAVt8qXuESBjUdXrLUQYD1o0akbNQTesm8hPyYczpI9CZfeVh6dgHy mWjmqMpfzDU14/DBY598oqjTh7OiU+qqUXfdhQWoWIU8HhNORHo+G7xaTKR8ObeYwYew OyI+D83MvXm1E5FyBMmxcJzuN0Kq+H8HWwzqX0Yd/cj2OM8dB4lQ3Tzh7GBk++pNM9bY H2I4qAEGVgBsOCFOiUhvsF6OMnlWwVep6KD5KnSBAxKWTucVjh7oL/xhSdp0ZN7Zd4ao ocn1lqHR285LYE/oXXDD3syv4zWana+P5VO/gzkJquZCukClr/64/Mfn4kxeS13l5ZJi 1V+w== X-Forwarded-Encrypted: i=1; AFNElJ+UWyIhH2ywm+YP4Wjm3cHO9W4W9j2Fa2P2c0kUKgfifjOEOYFyhhl+9LTnfF0PGP5Lt+Lyp5SqF52WfYFe@lists.postgresql.org X-Gm-Message-State: AOJu0YxU3AiGmeKvNkzljITRSqItnPQ3WdLo7yMWN0DkK5D1b1Cxf3ur 3HwBMbnj9GrhGVbmMuSDFU3//EnCMSag7/jaCeZ5CTnANueflaNvM8xmaAcLk/AhjIB78JZBrGI orgb89c5CPKdLsqxIWBHXJUxvLW3NlX0= X-Gm-Gg: Acq92OHKZSyU14CYQbb5dnq3RB7hwJfDYf7OdV0egyQeQdgw8AlDYz5dlljMQTNEUV4 uc1y7c13b+4T3onpJjqP2Bqa+dL9CbjJ4a+dQIkKXxn0S8pZFIFq/zO6LrtuWA/+w3zFb46nyTQ YLqIJIxo6aFhkrilO2+31azc+r8/MtfkdvwnelrxQ6J0rzzVR8Gea0ljyFq9t0/IAnFdzQb339j 7NBjqIiWqjcs3nkomp5yG10+tQCaNwOLwEm85rcdYi34Z5+G3KfTsfrTxO5Rs4ruNlSFH9fzOjC DeYkxMZwMUOXZg== X-Received: by 2002:a05:6402:3227:b0:67d:4eea:a29d with SMTP id 4fb4d7f45d1cf-68fa4f2a0ddmr2045602a12.4.1780778025310; Sat, 06 Jun 2026 13:33:45 -0700 (PDT) MIME-Version: 1.0 References: <20250718175314.4513c00a@karst> <20250729174852.14f23557@karst> In-Reply-To: From: Nikita Malakhov Date: Sat, 6 Jun 2026 23:33:32 +0300 X-Gm-Features: AVVi8CfxfUmHdiMFWs5zuVVm6Tkg1-Q3RUgk5o74aS6ewYZtn4dH3oAPHGHfoMo Message-ID: Subject: Re: [(known) BUG] DELETE/UPDATE more than one row in partitioned foreign table To: Etsuro Fujita Cc: Jehan-Guillaume de Rorthais , pgsql-hackers@lists.postgresql.org Content-Type: multipart/alternative; boundary="0000000000009f61ee06539bb169" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000009f61ee06539bb169 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi! Thanks for working on the subject! I'll try to take a look inside in a couple of days. On Fri, Jun 5, 2026 at 2:59=E2=80=AFPM Etsuro Fujita wrote: > On Mon, Jun 1, 2026 at 7:44=E2=80=AFPM Etsuro Fujita > 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 > --=20 Regards, Nikita Malakhov Postgres Professional The Russian Postgres Company https://postgrespro.ru/ --0000000000009f61ee06539bb169 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi!

Thanks for working= on the subject! I'll try to take a look inside in a couple of days.

On Fri, Jun 5, 2026 at 2:59=E2=80=AFPM Etsuro Fuji= ta <etsuro.fujita@gmail.com> wrote:
On= Mon, Jun 1, 2026 at 7:44=E2=80=AFPM Etsuro Fujita <etsuro.fujita@gmail.com> wr= ote:
> I think we should first work on a back-patchable solution.=C2=A0 So I&= #39;d
> like to re-propose the patch that I proposed in this thread before to<= br> > disallow UPDATE/DELETE in problematic cases [1].=C2=A0 Attached is a n= ew
> version of the patch.=C2=A0 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<= br> > 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 t= he
> 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.=C2=A0 = 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


--
Regards,
Nikita Malakhov
Postgres Professional
The Russian Postgres Company
https://postgrespro.ru/=
--0000000000009f61ee06539bb169--