-- sift.workers lists a sift_table next to the indexes: index is the table, kind sift_table, its directory entries and sealed write buffers are counted, -- and the columns that note a failed background step are 0 and NULL (the background of a table keeps no note). worker_state refuses anything else. SET client_min_messages = warning; CREATE EXTENSION pg_sift; CREATE TABLE tw (id int, g int, v float8) USING sift_table; CREATE TABLE tp (id int, g int); CREATE INDEX tp_col ON tp USING sift_col (id, g); INSERT INTO tw SELECT i, i % 10, i FROM generate_series(1, 5000) i; INSERT INTO tp SELECT i, i % 10 FROM generate_series(1, 100) i; SELECT index, kind, segments >= 1 AS has_segments, sealed >= 0 AS has_sealed, failures, failed_at, next_retry, error_code, last_error, due FROM sift.workers ORDER BY 1::text; index | kind | has_segments | has_sealed | failures | failed_at | next_retry | error_code | last_error | due --------+------------+--------------+------------+----------+-----------+------------+------------+------------+----- tp_col | sift_col | t | t | 0 | | | | | tw | sift_table | t | t | 0 | | | | | (2 rows) SELECT segments = (SELECT count(*) FROM sift.table_segments('tw')) AS same_segments FROM sift.worker_state('tw'); same_segments --------------- t (1 row) SELECT * FROM sift.worker_state('pg_class'); ERROR: "pg_class" is not a sift index SELECT * FROM sift.worker_state('tp'); ERROR: "tp" is not a sift index -- a role that cannot read the table does not see it CREATE ROLE tw_reader NOLOGIN; SET ROLE tw_reader; SELECT count(*) AS rows_seen FROM sift.workers; rows_seen ----------- 0 (1 row) RESET ROLE; GRANT SELECT ON tw TO tw_reader; SET ROLE tw_reader; SELECT index, kind FROM sift.workers; index | kind -------+------------ tw | sift_table (1 row) RESET ROLE; DROP TABLE tw, tp; DROP ROLE tw_reader; DROP EXTENSION pg_sift;