]> granicus.if.org Git - postgresql/commitdiff
Correctly initialize newly added struct member
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Wed, 3 Apr 2019 12:56:20 +0000 (09:56 -0300)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Wed, 3 Apr 2019 12:58:47 +0000 (09:58 -0300)
Valgrind was rightly complaining that IndexVacuumInfo->report_progress
(added by commit ab0dfc961b6a) was not being initialized in some code
paths.  Repair.

Per buildfarm member lousyjack.

src/backend/access/heap/vacuumlazy.c

index b5b464e4a9d744c089d2aeec83425ffe54f1cfa4..392b35ebb77ee4e1e5b785ccf883b9b963d408c0 100644 (file)
@@ -1717,6 +1717,7 @@ lazy_vacuum_index(Relation indrel,
 
        ivinfo.index = indrel;
        ivinfo.analyze_only = false;
+       ivinfo.report_progress = false;
        ivinfo.estimated_count = true;
        ivinfo.message_level = elevel;
        /* We can only provide an approximate value of num_heap_tuples here */
@@ -1749,6 +1750,7 @@ lazy_cleanup_index(Relation indrel,
 
        ivinfo.index = indrel;
        ivinfo.analyze_only = false;
+       ivinfo.report_progress = false;
        ivinfo.estimated_count = (vacrelstats->tupcount_pages < vacrelstats->rel_pages);
        ivinfo.message_level = elevel;