]> granicus.if.org Git - postgresql/commit
Fix autovacuum launcher attachment to its DSA
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Thu, 22 Jun 2017 17:50:26 +0000 (13:50 -0400)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Thu, 22 Jun 2017 17:50:26 +0000 (13:50 -0400)
commita4f06606a328664d79f34b6041e816908d93e063
treec1ec6a6b29f47a01118bd61b54354f37dc5ec4ac
parent2a6db5eba69c0d6c842360f836cadd20e6cd9a0c
Fix autovacuum launcher attachment to its DSA

The autovacuum launcher doesn't actually do anything with its DSA other
than creating it and attaching to it, but it's been observed that after
longjmp'ing to the standard error handling block (for example after
getting SIGINT) the autovacuum enters an infinite loop reporting that it
cannot attach to its DSA anymore (which is correct, because it's already
attached to it.)  Fix by only attempting to attach if not already
attached.

I introduced this bug together with BRIN autosummarization in
7526e10224f0.

Reported-by: Yugo Nagata.
Author: Thomas Munro.  I added the comment to go with it.
Discussion: https://postgr.es/m/20170621211538.0c9eae73.nagata@sraoss.co.jp
src/backend/postmaster/autovacuum.c