Skip to content

Instantly share code, notes, and snippets.

@pnorman
Created July 9, 2022 21:13
Show Gist options
  • Save pnorman/800434f5b027cdb5d01a93330199d5c2 to your computer and use it in GitHub Desktop.
Save pnorman/800434f5b027cdb5d01a93330199d5c2 to your computer and use it in GitHub Desktop.
Report index status
SELECT p.datname, relid::regclass as table, index_relid::regclass as index,
phase, lockers_done ||'/'|| lockers_total as lockers, blocks_done||'/'||blocks_total as blocks,
tuples_done||'/'||tuples_total as tuples, partitions_done||'/'||partitions_total as partitions, query
from pg_stat_progress_create_index p join pg_stat_activity a on (p.pid = a.pid);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment