postgresql/src/backend/postmaster
Alvaro Herrera be72b9c378 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 335f3d04e4, 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
2017-10-30 15:52:02 +01:00
..
autovacuum.c Fix autovacuum work item error handling 2017-10-30 15:52:02 +01:00
bgworker.c Add background worker type 2017-09-29 11:08:24 -04:00
bgwriter.c Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
checkpointer.c Make WAL segment size configurable at initdb time. 2017-09-19 22:03:48 -07:00
fork_process.c Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
Makefile
pgarch.c Sync process names between ps and pg_stat_activity 2017-09-20 08:59:03 -04:00
pgstat.c Sync process names between ps and pg_stat_activity 2017-09-20 08:59:03 -04:00
postmaster.c Replace most usages of ntoh[ls] and hton[sl] with pg_bswap.h. 2017-10-01 15:36:14 -07:00
startup.c Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
syslogger.c Sync process names between ps and pg_stat_activity 2017-09-20 08:59:03 -04:00
walwriter.c Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00