Re: [BUG] Query with postgres fwd deletes more tuples than it should
От | Daniil Davydov |
---|---|
Тема | Re: [BUG] Query with postgres fwd deletes more tuples than it should |
Дата | |
Msg-id | CAJDiXghD7rSZE+Nz=gOp75PJB63K_y-SEQXyf9z26r3kZFGbNw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [BUG] Query with postgres fwd deletes more tuples than it should (Etsuro Fujita <etsuro.fujita@gmail.com>) |
Ответы |
Re: [BUG] Query with postgres fwd deletes more tuples than it should
|
Список | pgsql-hackers |
Hi, On Wed, Sep 17, 2025 at 6:46 PM Etsuro Fujita <etsuro.fujita@gmail.com> wrote: > > On Wed, Sep 17, 2025 at 2:46 PM <jiaoshuntian@highgo.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
В списке pgsql-hackers по дате отправления: