Parsed test spec with 4 sessions starting permutation: w1_begin b_cic r_state r_plan r_count w1_commit r_state r_count step w1_begin: BEGIN; INSERT INTO cicp VALUES (3001, to_ftsdoc('simple', 'beta')); step b_cic: CREATE INDEX CONCURRENTLY cicp_fts ON cicp USING fts (d); step r_state: SELECT indisready, indisvalid, pg_relation_size(indexrelid) > 0 AS has_blocks FROM pg_index WHERE indexrelid = 'cicp_fts'::regclass; indisready|indisvalid|has_blocks ----------+----------+---------- f |f |f (1 row) step r_plan: EXPLAIN (COSTS OFF) SELECT id FROM cicp WHERE d @@@ 'doc & 17'::ftsquery; QUERY PLAN ------------------------------------------------ Seq Scan on cicp Filter: (d @@@ '(''doc'' & ''17'')'::ftsquery) (2 rows) step r_count: SELECT (SELECT count(*) FROM cicp WHERE d @@@ 'omega'::ftsquery) AS omega, (SELECT count(*) FROM cicp WHERE d @@@ 'alpha'::ftsquery) AS alpha; omega|alpha -----+----- 0| 2000 (1 row) step w1_commit: COMMIT; step b_cic: <... completed> step r_state: SELECT indisready, indisvalid, pg_relation_size(indexrelid) > 0 AS has_blocks FROM pg_index WHERE indexrelid = 'cicp_fts'::regclass; indisready|indisvalid|has_blocks ----------+----------+---------- t |t |t (1 row) step r_count: SELECT (SELECT count(*) FROM cicp WHERE d @@@ 'omega'::ftsquery) AS omega, (SELECT count(*) FROM cicp WHERE d @@@ 'alpha'::ftsquery) AS alpha; omega|alpha -----+----- 0| 2000 (1 row) starting permutation: w1_begin b_cic w2_begin w1_commit r_state r_cancel r_noop w2_commit r_state r_plan r_count r_drop step w1_begin: BEGIN; INSERT INTO cicp VALUES (3001, to_ftsdoc('simple', 'beta')); step b_cic: CREATE INDEX CONCURRENTLY cicp_fts ON cicp USING fts (d); step w2_begin: BEGIN; INSERT INTO cicp VALUES (3002, to_ftsdoc('simple', 'omega alpha')); step w1_commit: COMMIT; step r_state: SELECT indisready, indisvalid, pg_relation_size(indexrelid) > 0 AS has_blocks FROM pg_index WHERE indexrelid = 'cicp_fts'::regclass; indisready|indisvalid|has_blocks ----------+----------+---------- t |f |t (1 row) step r_cancel: SELECT pg_cancel_backend(pid) FROM pg_stat_activity WHERE query ~ 'CREATE INDEX CONCURRENTLY cicp_fts' AND pid <> pg_backend_pid(); step b_cic: <... completed> ERROR: canceling statement due to user request step r_cancel: <... completed> pg_cancel_backend ----------------- t (1 row) step r_noop: step w2_commit: COMMIT; step r_state: SELECT indisready, indisvalid, pg_relation_size(indexrelid) > 0 AS has_blocks FROM pg_index WHERE indexrelid = 'cicp_fts'::regclass; indisready|indisvalid|has_blocks ----------+----------+---------- t |f |t (1 row) step r_plan: EXPLAIN (COSTS OFF) SELECT id FROM cicp WHERE d @@@ 'doc & 17'::ftsquery; QUERY PLAN ------------------------------------------------ Seq Scan on cicp Filter: (d @@@ '(''doc'' & ''17'')'::ftsquery) (2 rows) step r_count: SELECT (SELECT count(*) FROM cicp WHERE d @@@ 'omega'::ftsquery) AS omega, (SELECT count(*) FROM cicp WHERE d @@@ 'alpha'::ftsquery) AS alpha; omega|alpha -----+----- 1| 2001 (1 row) step r_drop: DROP INDEX cicp_fts; starting permutation: r_snap w1_hot b_hc w1_xmin r_hc r_end step r_snap: BEGIN ISOLATION LEVEL REPEATABLE READ; SELECT count(*) AS hc_rows FROM hc; hc_rows ------- 50 (1 row) step w1_hot: UPDATE hc SET d = to_ftsdoc('simple', 'omega') WHERE id = 1; step b_hc: CREATE INDEX hc_fts ON hc USING fts (d); step w1_xmin: SELECT indcheckxmin FROM pg_index WHERE indexrelid = 'hc_fts'::regclass; indcheckxmin ------------ t (1 row) step r_hc: SELECT (SELECT count(*) FROM hc WHERE d @@@ 'omega'::ftsquery) AS omega, (SELECT count(*) FROM hc WHERE d @@@ 'alpha'::ftsquery) AS alpha; omega|alpha -----+----- 0| 50 (1 row) step r_end: COMMIT;