Fix error handling path in autovacuum launcher

Alvaro Herrera <alvherre@alvh.no-ip.org>

Commit: 870da1e1546c9563c5ae45918392cf7bbc7e5b0e
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Date: 2017-08-15T16:35:12Z
Releases: 10.0
Fix error handling path in autovacuum launcher

The original code (since 00e6a16d01) was assuming aborting the
transaction in autovacuum launcher was sufficient to release all
resources, but in reality the launcher runs quite a lot of code out of
any transactions.  Re-introduce individual cleanup calls to make abort
more robust.

Reported-by: Robert Haas
Discussion: https://postgr.es/m/CA+TgmobQVbz4K_+RSmiM9HeRKpy3vS5xnbkL95gSEnWijzprKQ@mail.gmail.com

Files

PathChange+/−
src/backend/postmaster/autovacuum.c modified +21 −0

Discussion