Use pg_stat_get_xact* functions within xacts

Simon Riggs <simon@2ndQuadrant.com>

Commit: 5b0d7f6996abfc1e3e51bac62af6076903635dc8
Author: Simon Riggs <simon@2ndQuadrant.com>
Date: 2018-03-28T04:21:00Z
Releases: 11.0
Use pg_stat_get_xact* functions within xacts

Resolve build farm failures from c203d6cf81b4d7e43,
diagnosed by Tom Lane.

The output of pg_stat_get_xact_tuples_hot_updated() and friends
is not guaranteed to show anything after the transaction completes.
Data is flushed slowly to stats collector, so using them can
give timing issues.

Files