From: | Noah Misch <noah(at)leadboat(dot)com> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Unpin buffer before inplace update waits for an XID to end. |
Date: | 2024-10-29 16:41:47 |
Message-ID: | E1t5pHw-0031vY-B8@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Unpin buffer before inplace update waits for an XID to end.
Commit a07e03fd8fa7daf4d1356f7cb501ffe784ea6257 changed inplace updates
to wait for heap_update() commands like GRANT TABLE and GRANT DATABASE.
By keeping the pin during that wait, a sequence of autovacuum workers
and an uncommitted GRANT starved one foreground LockBufferForCleanup()
for six minutes, on buildfarm member sarus. Prevent, at the cost of a
bit of complexity. Back-patch to v12, like the earlier commit. That
commit and heap_inplace_lock() have not yet appeared in any release.
Discussion: https://postgr.es/m/20241026184936.ae.nmisch@google.com
Branch
------
REL_12_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/c2139db11b161096c9d65a0fa7c1a8a3227ea856
Modified Files
--------------
src/backend/access/heap/heapam.c | 10 +++++++---
src/backend/access/index/genam.c | 12 +++++-------
src/include/access/heapam.h | 3 ++-
3 files changed, 14 insertions(+), 11 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Davis | 2024-10-29 17:15:59 | pgsql: Add missing CommandCounterIncrement() in stats import functions. |
Previous Message | Tom Lane | 2024-10-29 15:50:38 | pgsql: Update time zone data files to tzdata release 2024b. |