Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8cf98da

Browse files
committed
PGPRO-2065: do not ignore indisready and indisvalid indexes
1 parent47283e1 commit8cf98da

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

‎src/backup.c

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,11 +1056,7 @@ do_amcheck(void)
10561056

10571057
n_databases=PQntuples(res_db);
10581058

1059-
/* TODO Warn user that one connection is used for snaphot */
1060-
//if (num_threads > 1)
1061-
//num_threads--;
1062-
1063-
elog(INFO,"Start checking instance with amcheck");
1059+
elog(INFO,"Start checking PostgreSQL instance with amcheck");
10641060

10651061
/* For each database check indexes. In parallel. */
10661062
for(i=0;i<n_databases;i++)
@@ -3522,12 +3518,13 @@ get_index_list(PGresult *res_db, int db_number,
35223518
{
35233519

35243520
/* select only valid btree and persistent indexes */
3525-
res=pgut_execute(db_conn,"SELECT cls.oid, cls.relname"
3526-
" FROM pg_index idx "
3527-
" JOIN pg_class cls ON cls.oid=idx.indexrelid "
3528-
" JOIN pg_am am ON am.oid=cls.relam "
3529-
" WHERE am.amname='btree' AND cls.relpersistence != 't'"
3530-
" AND idx.indisready AND idx.indisvalid; ",0,NULL);
3521+
res=pgut_execute(db_conn,"SELECT cls.oid, cls.relname "
3522+
"FROM pg_index idx "
3523+
"JOIN pg_class cls ON cls.oid=idx.indexrelid "
3524+
"JOIN pg_am am ON am.oid=cls.relam "
3525+
"WHERE am.amname='btree' AND cls.relpersistence != 't'",
3526+
//"AND idx.indisready AND idx.indisvalid",
3527+
0,NULL);
35313528
}
35323529
else
35333530
{
@@ -3538,8 +3535,8 @@ get_index_list(PGresult *res_db, int db_number,
35383535
"JOIN pg_am am ON am.oid=cls.relam "
35393536
"JOIN pg_tablespace tbl ON tbl.oid=cls.reltablespace "
35403537
"WHERE am.amname='btree' AND cls.relpersistence != 't' "
3541-
"AND idx.indisready AND idx.indisvalid "
3542-
"AND tbl.spcname !='pg_global'",0,NULL);
3538+
//"AND idx.indisready AND idx.indisvalid "
3539+
"AND tbl.spcname !='pg_global'",0,NULL);
35433540
}
35443541

35453542
/* add info needed to check indexes into index_list */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp