As referenced in the discussion #636 connecting to a Linux database running PostgreSQL from Windows and running the PostgreSQL metrics returns the following error.
Waiting for Connection to PostgreSQL for Database Metrics...
Metrics Connecting to host:razorbill port:5432
Metrics Connected
Starting Metrics, read 855 rows from pg_active_session_history
call ash_fetch, error:can't read "public(cpucount)": no such element in array
The fix is to update the source file pgmet.tcl in src/postgresql and modify the start of proc pg_HowManyProcessorsWindows from this:
proc pg_HowManyProcessorsWindows {} {
global S cpu_model
set cpu_model [lindex [twapi::get_processor_info 0 -processorname] 1]
To this:
proc pg_HowManyProcessorsWindows {} {
global S cpu_model
if [catch {package require twapi} ] {
set ::S(cpus) 1
return
}
As referenced in the discussion #636 connecting to a Linux database running PostgreSQL from Windows and running the PostgreSQL metrics returns the following error.
The fix is to update the source file pgmet.tcl in src/postgresql and modify the start of proc pg_HowManyProcessorsWindows from this:
To this: