Skip to content

Commit

Permalink
remove check for indisready flag
Browse files Browse the repository at this point in the history
  • Loading branch information
zorancv committed Jun 14, 2024
1 parent 7dd4b21 commit d2fdc1b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions store/postgres/src/relational/index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -802,8 +802,7 @@ impl IndexList {
if let Some(index_name) = ind_name {
let table_name = table.name.clone();
let query = r#"
SELECT x.indisvalid AS isvalid,
x.indisready AS isready
SELECT x.indisvalid AS isvalid
FROM pg_index x
JOIN pg_class c ON c.oid = x.indrelid
JOIN pg_class i ON i.oid = x.indexrelid
Expand All @@ -822,7 +821,8 @@ impl IndexList {
.map(|ii| ii.into())
.collect::<Vec<IndexInfo>>();
assert!(ii_vec.len() <= 1);
if ii_vec.len() == 0 || !ii_vec[0].isvalid || !ii_vec[0].isready {
if ii_vec.len() == 0 || !ii_vec[0].isvalid {
// if a bad index exist lets first drop it
if ii_vec.len() > 0 {
let drop_query = sql_query(format!(
"DROP INDEX {}.{};",
Expand Down

0 comments on commit d2fdc1b

Please sign in to comment.