Improve the vacuum error context phase information.
authorAmit Kapila <akapila@postgresql.org>
Mon, 24 Aug 2020 02:52:54 +0000 (08:22 +0530)
committerAmit Kapila <akapila@postgresql.org>
Mon, 24 Aug 2020 02:52:54 +0000 (08:22 +0530)
commitb4ef5ac0b7bfa734ad908bb5577cf4ee65ce2974
tree6d5b51148b9374e6c915d13baefb8e2fa78c8f2c
parentde627adaad3a161b3ae0cafeb76c20519845799b
Improve the vacuum error context phase information.

We were displaying the wrong phase information for 'info' message in the
index clean up phase because we were switching to the previous phase a bit
early. We were also not displaying context information for heap phase
unless the block number is valid which is fine for error cases but for
messages at 'info' or lower error level it appears to be inconsistent with
index phase information.

Reported-by: Sawada Masahiko
Author: Sawada Masahiko
Reviewed-by: Amit Kapila
Backpatch-through: 13, where it was introduced
Discussion: https://postgr.es/m/CA+fd4k4HcbhPnCs7paRTw1K-AHin8y4xKomB9Ru0ATw0UeTy2w@mail.gmail.com
src/backend/access/heap/vacuumlazy.c