From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Release lock after encountering bogs row in vac_truncate_clog() |
Date: | 2023-07-13 20:29:40 |
Message-ID: | E1qK2wW-000DmA-0w@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Release lock after encountering bogs row in vac_truncate_clog()
When vac_truncate_clog() encounters bogus datfrozenxid / datminmxid values, it
returns early. Unfortunately, until now, it did not release
WrapLimitsVacuumLock. If the backend later tries to acquire
WrapLimitsVacuumLock, the session / autovacuum worker hangs in an
uncancellable way. Similarly, other sessions will hang waiting for the
lock. However, if the backend holding the lock exited or errored out for some
reason, the lock was released.
The bug was introduced as a side effect of 566372b3d643.
It is interesting that there are no production reports of this problem. That
is likely due to a mix of bugs leading to bogus values having gotten less
common, process exit releasing locks and instances of hangs being hard to
debug for "normal" users.
Discussion: https://postgr.es/m/20230621221208.vhsqgduwfpzwxnpg@awork3.anarazel.de
Branch
------
REL_13_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/53336e8f6675c30e35e85f87993d9df0db7e1cb0
Modified Files
--------------
src/backend/commands/vacuum.c | 4 ++++
1 file changed, 4 insertions(+)
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2023-07-14 00:02:15 | pgsql: Remove double quotes from the second column of wait_event_names. |
Previous Message | Tom Lane | 2023-07-13 17:08:54 | pgsql: Remove unnecessary pfree() in g_intbig_compress(). |