PG-160: Integration with PGXN.

This commit is contained in:
Ibrar Ahmed
2021-01-11 17:57:27 +00:00
parent 97a9f44be6
commit 84de947da6
2 changed files with 48 additions and 0 deletions

View File

@@ -1196,6 +1196,8 @@ pg_stat_monitor_internal(FunctionCallInfo fcinfo,
values[i++] = CStringGetTextDatum(pgss->bucket_start_time[entry->key.bucket_id]);
for (kind = 0; kind < PGSS_NUMKIND; kind++)
{
if (tmp.calls[kind].calls == 0)
tmp.calls[kind].calls++;
values[i++] = Int64GetDatumFast(tmp.calls[kind].calls);
values[i++] = Float8GetDatumFast(tmp.time[kind].total_time);
values[i++] = Float8GetDatumFast(tmp.time[kind].min_time);