]> granicus.if.org Git - postgresql/commitdiff
Report correct name in autovacuum "work items" activity
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Fri, 22 Feb 2019 16:00:16 +0000 (13:00 -0300)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Fri, 22 Feb 2019 16:00:16 +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.GR28750@telsasoft.com

src/backend/postmaster/autovacuum.c

index d1177b3855fad52c4eb251721647f4b7e298b695..347f91e937b08cfe984e97bb8b12da3fc04dff46 100644 (file)
@@ -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);