The version of pg_activity for Ubuntu 24.04 require access to tables that are restricted on the Odoo.sh platform.
Instead:
Query the pg_stat_activity table like this:
select * from pg_stat_activity;
You can then kill a query like this:
select pg_terminate_backend(PID);