ERROR: tuple to be updated was already modified by an operation triggered by the current command
Richard Guo <guofenglinux@gmail.com>
From: Richard Guo <guofenglinux@gmail.com>
To: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Date: 2025-01-23T09:11:44Z
Lists: pgsql-bugs
I came across $SUBJECT, which can be reproduced using the queries
below.
# create temporary table p (a int primary key) on commit delete rows;
CREATE TABLE
# create temporary table c () inherits (p);
CREATE TABLE
# analyze; -- no error
ANALYZE
# drop table c;
DROP TABLE
# analyze; -- error
ERROR: tuple to be updated was already modified by an operation
triggered by the current command
This error happens in heap_inplace_lock(), and git-bisect says the
first bad commit is:
a07e03fd8fa7daf4d1356f7cb501ffe784ea6257 is the first bad commit
commit a07e03fd8fa7daf4d1356f7cb501ffe784ea6257
Author: Noah Misch <noah@leadboat.com>
Date: Tue Sep 24 15:25:18 2024 -0700
Fix data loss at inplace update after heap_update().
... which introduced heap_inplace_lock().
Is this error expected, or could it be a bug?
Thanks
Richard
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Avoid ERROR at ON COMMIT DELETE ROWS after relhassubclass=f.
- d34b671a63e6 13.21 landed
- a61b67cd06c2 14.18 landed
- e0f53e669969 15.13 landed
- d0a049987e5a 17.5 landed
- 5905e9935999 16.9 landed
- 2d5350cfbdc6 18.0 landed
-
Fix data loss at inplace update after heap_update().
- a07e03fd8fa7 18.0 cited
-
Don't lose partitioned table reltuples=0 after relhassubclass=f.
- 7102070329d8 18.0 cited