Report correct name in autovacuum "work items" activity
authorAlvaro Herrera
Fri, 22 Feb 2019 16:00:15 +0000 (13:00 -0300)
committerAlvaro Herrera
Fri, 22 Feb 2019 16:00:15 +0000 (13:00 -0300)
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[email protected]

src/backend/postmaster/autovacuum.c

index 0a8fb3d58f07da45daca2a42dfdc7f58c188543f..f40147a34771fd6e12ddbb808ccdac016743b575 100644 (file)
@@ -2656,7 +2656,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);