From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Fix autovacuum work item error handling |
Date: | 2017-10-30 16:13:16 |
Message-ID: | E1e9Cge-00074Y-ED@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Fix autovacuum work item error handling
In autovacuum's "work item" processing, a few strings were allocated in
the current transaction's memory context, which goes away during error
handling; if an error happened during execution of the work item, the
pfree() calls to clean up afterwards would try to release already-released
memory, possibly leading to a crash. In branch master, this was already
fixed by commit 335f3d04e4c8, so backpatch that to REL_10_STABLE to fix
the problem there too.
As a secondary problem, verify that the autovacuum worker is connected
to the right database for each work item; otherwise some items would be
discarded by workers in other databases.
Reported-by: Justin Pryzby
Discussion: https://postgr.es/m/20171014035732.GB31726@telsasoft.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/be72b9c378bfe99a3d175c98d36dc150229f4faf
Modified Files
--------------
src/backend/postmaster/autovacuum.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2017-10-30 20:44:34 | pgsql: Doc: call out UPDATE syntax change as a v10 compatibility issue. |
Previous Message | Magnus Hagander | 2017-10-30 13:40:10 | pgsql: Fix typo |