diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2017-10-30 15:52:13 +0100 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2017-10-30 15:52:13 +0100 |
commit | 52ca7572c3642ccbb46a619c03efe1928811ceae (patch) | |
tree | af7fe84ae838daa5441ed65189df5d6a59161e0d /src/backend/access/gist | |
parent | 0f1fbe7122208f4734dcb285594d06e7ebd07b10 (diff) | |
download | postgresql-52ca7572c3642ccbb46a619c03efe1928811ceae.tar.gz postgresql-52ca7572c3642ccbb46a619c03efe1928811ceae.zip |
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
Diffstat (limited to 'src/backend/access/gist')
0 files changed, 0 insertions, 0 deletions