From: Alvaro Herrera Date: Fri, 22 Feb 2019 16:00:16 +0000 (-0300) Subject: Report correct name in autovacuum "work items" activity X-Git-Tag: REL_12_BETA1~686 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=98098faaff77a632c759c967f3b956524e492ee4;p=postgresql Report correct name in autovacuum "work items" activity We were reporting the database name instead of the relation name to pg_stat_activity. Repair. Reported-by: Justin Pryzby Discussion: https://postgr.es/m/20190220185552.GR28750@telsasoft.com --- diff --git a/src/backend/postmaster/autovacuum.c b/src/backend/postmaster/autovacuum.c index d1177b3855..347f91e937 100644 --- a/src/backend/postmaster/autovacuum.c +++ b/src/backend/postmaster/autovacuum.c @@ -2633,7 +2633,7 @@ perform_work_item(AutoVacuumWorkItem *workitem) if (!cur_relname || !cur_nspname || !cur_datname) goto deleted2; - autovac_report_workitem(workitem, cur_nspname, cur_datname); + autovac_report_workitem(workitem, cur_nspname, cur_relname); /* clean up memory before each work item */ MemoryContextResetAndDeleteChildren(PortalContext);