/
githubmirror
/
postgres
Обзор
Документация
Войти
/
githubmirror
/
postgres
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/test/modules/injection_points/expected/reindex_conc.out
51 строка
2 KB
Michael Paquier
Fix waits of REINDEX CONCURRENTLY for indexes with predicates or expressions
09 сен 2024, 07:49
09 сен 2024, 07:49
5bbdfa8
Код
Авторство
О чём код?
-- Tests for REINDEX CONCURRENTLY CREATE EXTENSION injection_points; -- Check safety of indexes with predicates and expressions. SELECT injection_points_set_local(); injection_points_set_local ---------------------------- (1 row) SELECT injection_points_attach('reindex-conc-index-safe', 'notice'); injection_points_attach ------------------------- (1 row) SELECT injection_points_attach('reindex-conc-index-not-safe', 'notice'); injection_points_attach ------------------------- (1 row) CREATE SCHEMA reindex_inj; CREATE TABLE reindex_inj.tbl(i int primary key, updated_at timestamp); CREATE UNIQUE INDEX ind_simple ON reindex_inj.tbl(i); CREATE UNIQUE INDEX ind_expr ON reindex_inj.tbl(ABS(i)); CREATE UNIQUE INDEX ind_pred ON reindex_inj.tbl(i) WHERE mod(i, 2) = 0; CREATE UNIQUE INDEX ind_expr_pred ON reindex_inj.tbl(abs(i)) WHERE mod(i, 2) = 0; REINDEX INDEX CONCURRENTLY reindex_inj.ind_simple; NOTICE: notice triggered for injection point reindex-conc-index-safe REINDEX INDEX CONCURRENTLY reindex_inj.ind_expr; NOTICE: notice triggered for injection point reindex-conc-index-not-safe REINDEX INDEX CONCURRENTLY reindex_inj.ind_pred; NOTICE: notice triggered for injection point reindex-conc-index-not-safe REINDEX INDEX CONCURRENTLY reindex_inj.ind_expr_pred; NOTICE: notice triggered for injection point reindex-conc-index-not-safe -- Cleanup SELECT injection_points_detach('reindex-conc-index-safe'); injection_points_detach ------------------------- (1 row) SELECT injection_points_detach('reindex-conc-index-not-safe'); injection_points_detach ------------------------- (1 row) DROP TABLE reindex_inj.tbl; DROP SCHEMA reindex_inj; DROP EXTENSION injection_points;