| From: | Noah Misch <noah(at)leadboat(dot)com> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Avoid ERROR at ON COMMIT DELETE ROWS after relhassubclass=f. |
| Date: | 2025-04-20 15:30:17 |
| Message-ID: | E1u6Wcb-000yA0-0j@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
Avoid ERROR at ON COMMIT DELETE ROWS after relhassubclass=f.
Commit 7102070329d8147246d2791321f9915c3b5abf31 fixed a similar bug, but
it missed the case of database-wide ANALYZE ("use_own_xacts" mode).
Commit a07e03fd8fa7daf4d1356f7cb501ffe784ea6257 changed consequences
from silent discard of a pg_class stats (relpages et al.) update to
ERROR "tuple to be updated was already modified". Losing a relpages
update of an ON COMMIT DELETE ROWS table was negligible, but a
COMMIT-time error isn't negligible. Back-patch to v13 (all supported
versions).
Reported-by: Richard Guo <guofenglinux(at)gmail(dot)com
Reported-by: Robins Tharakan <tharakan(at)gmail(dot)com>
Discussion: https://postgr.es/m/CAMbWs4-XwMKMKJ_GT=p3_-_=j9rQSEs1FbDFUnW9zHuKPsPNEQ@mail.gmail.com
Backpatch-through: 13
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/2d5350cfbdc6e61124214d68713295bb060bc541
Modified Files
--------------
src/backend/commands/vacuum.c | 2 ++
src/test/regress/expected/maintain_every.out | 33 ++++++++++++++++++++++++++++
src/test/regress/parallel_schedule | 4 ++++
src/test/regress/sql/maintain_every.sql | 26 ++++++++++++++++++++++
4 files changed, 65 insertions(+)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Noah Misch | 2025-04-20 19:04:54 | pgsql: Comment on need to MarkBufferDirty() if omitting DELAY_CHKPT_STA |
| Previous Message | David Rowley | 2025-04-20 10:13:15 | pgsql: Fix issue with ORDER BY / DISTINCT aggregates and FILTER |