我有一个在pg_toast上运行的autovacuum进程:
select query,from pg_stat_activity where query like '%autov%'; "autovacuum: VACUUM pg_toast.pg_toast_15404513 "
我如何找到什么表/索引/这pg_toast属于什么?还是自动真空工作在别的什么?
我想你会想要这样的东西:
原文链接:https://www.f2er.com/postgresql/192614.htmlselect n.nspname,c.relname from pg_class c inner join pg_namespace n on c.relnamespace = n.oid where reltoastrelid = ( select oid from pg_class where relname = 'pg_toast_15404513' and relnamespace = (SELECT n2.oid FROM pg_namespace n2 WHERE n2.nspname = 'pg_toast') )
如果Pg在真空指令摘要中报告了这一点,这将是很好的.