File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -603,13 +603,27 @@ rebuild_indexes(const repack_table *table)
603
603
int num_indexes ;
604
604
int i ;
605
605
int num_active_workers = 0 ;
606
- repack_index * index_jobs ;
606
+ repack_index * index_jobs ;
607
607
char buffer [12 ];
608
608
bool have_error = false;
609
609
610
610
elog (DEBUG2 , "---- create indexes ----" );
611
611
612
612
params [0 ] = utoa (table -> target_oid , buffer );
613
+
614
+ /* First, just display a warning message for any invalid indexes
615
+ * which may be on the table (mostly to match the behavior of 1.1.8).
616
+ */
617
+ res = execute ("SELECT pg_get_indexdef(indexrelid)"
618
+ " FROM pg_index WHERE indrelid = $1 AND NOT indisvalid" ,
619
+ 1 , params );
620
+ for (i = 0 ; i < PQntuples (res ); i ++ )
621
+ {
622
+ const char * indexdef ;
623
+ indexdef = getstr (res , i , 0 );
624
+ elog (WARNING , "skipping invalid index: %s" , indexdef );
625
+ }
626
+
613
627
res = execute ("SELECT indexrelid,"
614
628
" repack.repack_indexdef(indexrelid, indrelid), "
615
629
" pg_get_indexdef(indexrelid)"
You can’t perform that action at this time.
0 commit comments