File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
store/postgres/src/relational Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -752,7 +752,7 @@ pub struct IndexList {
752752 pub ( crate ) indexes : HashMap < String , Vec < CreateIndex > > ,
753753}
754754
755- pub fn load_indexes_from_table (
755+ pub async fn load_indexes_from_table (
756756 conn : & mut PgConnection ,
757757 table : & Arc < Table > ,
758758 schema_name : & str ,
@@ -774,7 +774,7 @@ impl IndexList {
774774 let schema_name = site. namespace . clone ( ) ;
775775 let layout = store. layout ( conn, site) . await ?;
776776 for ( _, table) in & layout. tables {
777- let indexes = load_indexes_from_table ( conn, table, schema_name. as_str ( ) ) ?;
777+ let indexes = load_indexes_from_table ( conn, table, schema_name. as_str ( ) ) . await ?;
778778 list. indexes . insert ( table. name . to_string ( ) , indexes) ;
779779 }
780780 Ok ( list)
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ impl TablePair {
5151 /// Create a `TablePair` for `src`. This creates a new table `dst` with
5252 /// the same structure as the `src` table in the database, but in a
5353 /// different namespace so that the names of indexes etc. don't clash
54- fn create (
54+ async fn create (
5555 conn : & mut PgConnection ,
5656 src : Arc < Table > ,
5757 src_nsp : Namespace ,
@@ -68,7 +68,8 @@ impl TablePair {
6868 let mut list = IndexList {
6969 indexes : HashMap :: new ( ) ,
7070 } ;
71- let indexes = load_indexes_from_table ( conn, & src, src_nsp. as_str ( ) ) ?
71+ let indexes = load_indexes_from_table ( conn, & src, src_nsp. as_str ( ) )
72+ . await ?
7273 . into_iter ( )
7374 . map ( |index| index. with_nsp ( dst_nsp. to_string ( ) ) )
7475 . collect :: < Result < Vec < CreateIndex > , _ > > ( ) ?;
@@ -436,7 +437,8 @@ impl Layout {
436437 dst_nsp. clone ( ) ,
437438 & self . input_schema ,
438439 & self . catalog ,
439- ) ?;
440+ )
441+ . await ?;
440442 // Copy final entities. This can happen in parallel to indexing as
441443 // that part of the table will not change
442444 pair. copy_final_entities (
You can’t perform that action at this time.
0 commit comments