From: | Daniil Davydov <3danissimo(at)gmail(dot)com> |
---|---|
To: | Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com> |
Cc: | jiaoshuntian(at)highgo(dot)com, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: [BUG] Query with postgres fwd deletes more tuples than it should |
Date: | 2025-09-17 13:10:52 |
Message-ID: | CAJDiXghD7rSZE+Nz=gOp75PJB63K_y-SEQXyf9z26r3kZFGbNw@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
On Wed, Sep 17, 2025 at 6:46 PM Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com> wrote:
>
> On Wed, Sep 17, 2025 at 2:46 PM <jiaoshuntian(at)highgo(dot)com> wrote:
> > I can reproduce the same issue using the script you provided.
>
> This is a known bug. See discussions in [1], where I proposed a
> simple fix for it that disables foreign modifications in problematic
> cases as shown by Daniil.
>
Thanks! Somehow I overlooked it.
> > I think a good way to fix would be to use `(tableoid, ctid)` together as the row
> > identifier in row-by-row updates/deletes. This combination is unique
> > across partitions and avoids the incorrect behavior, while still keeping
> > LIMIT support.
>
> Agreed; actually I created such a fix as well a long time ago, but
> unfortunately it has many issues...
I'll try to help with implementation of the proposed idea.
BTW, maybe we should move commitfest entry [1] to the next CF?
[1] https://commitfest.postgresql.org/patch/1819/
--
Best regards,
Daniil Davydov
From | Date | Subject | |
---|---|---|---|
Previous Message | Robert Haas | 2025-09-17 13:09:28 | Re: REPACK and naming |