PG-542: Performance improvement of pg_stat_monitor.

Saving the client IP address once per the lifetime of a backend. This avoid
the expensive operation multiple times, and hence improving performance
significantly.
This commit is contained in:
Muhammad Usama
2023-02-23 01:33:23 +05:00
parent 7b9711eb7d
commit 7b0e603bcf
2 changed files with 38 additions and 31 deletions

View File

@@ -87,7 +87,7 @@ CREATE FUNCTION pg_stat_monitor_internal(
OUT username text,
OUT dbid oid,
OUT datname text,
OUT client_ip int4,
OUT client_ip int8,
OUT queryid int8, -- 4
OUT planid int8,