As idx_scan and idx_tup_fetch can be NULL in pg_catalog.pg_stat_xact_user_tables, COALESCE(...,0) around them before doing addition otherwise the end result will be NULL