pgstat_create_function() creates stats for a function in a transactional
fashion, so the stats would be dropped if transaction creating the
function is aborted, not committed.
Author: Amul Sul
Discussion: https://postgr.es/m/CAAJ_b97x1T3xgAMWNj4w7kSgN0nTuG-vLrQJ4NB-dsNr0Kudxw@mail.gmail.com
AtEOXact_GUC(true, save_nestlevel);
}
- /* ensure that stats are dropped if transaction commits */
+ /* ensure that stats are dropped if transaction aborts */
if (!is_update)
pgstat_create_function(retval);