zheap: Also increment tuples_updates for inplace updates.
authorAndres Freund <andres@anarazel.de>
Tue, 11 Dec 2018 01:31:46 +0000 (17:31 -0800)
committerAndres Freund <andres@anarazel.de>
Tue, 11 Dec 2018 01:36:58 +0000 (17:36 -0800)
That's more in line with HOT treatment, and avoids breaking newer
tests in stats.sql.

Author:
Reviewed-By:
Discussion: https://postgr.es/m/
Backpatch:

src/backend/postmaster/pgstat.c

index b72795825f8e6be6a00ac41fc132d5158c27aa29..64a68f00cbc34469d3f0cbcf7fa06f238af69c85 100644 (file)
@@ -1943,6 +1943,9 @@ pgstat_count_zheap_update(Relation rel)
            pgstat_info->trans->nest_level != nest_level)
            add_tabstat_xact_level(pgstat_info, nest_level);
 
+       /* increase, similar to pgstat_count_heap_update */
+       pgstat_info->trans->tuples_updated++;
+
        /* t_tuples_hot_updated is nontransactional, so just advance it */
        pgstat_info->t_counts.t_tuples_hot_updated++;
    }