Postgres pg_toast in autovacuum - which table?

Henley picture Henley · Aug 27, 2013 · Viewed 12.2k times · Source

I have an autovacuum process running on pg_toast:

select query, from pg_stat_activity where query like '%autov%';
"autovacuum: VACUUM pg_toast.pg_toast_15404513 "

How do I find out what table/index/whatever this pg_toast pertains to? Or is the autovacuum working on something else?

Answer

GreenReaper picture GreenReaper · Apr 23, 2014

Here's a shorter way:

select 15404513::regclass;

where 15404513 is pg_toast_ suffix.