Skip to content

Commit 4251751

Browse files
author
Sofia Kopikova
committed
[PBCKP-120] skip partitioned indexes for checkdb --amcheck
Tags: pg_probackup
1 parent acc8edc commit 4251751

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/checkdb.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,9 @@ get_index_list(const char *dbname, bool first_db_with_amcheck,
461461
"LEFT JOIN pg_catalog.pg_class cls ON idx.indexrelid=cls.oid "
462462
"LEFT JOIN pg_catalog.pg_namespace nmspc ON cls.relnamespace=nmspc.oid "
463463
"LEFT JOIN pg_catalog.pg_am am ON cls.relam=am.oid "
464-
"WHERE am.amname='btree' AND cls.relpersistence != 't' "
464+
"WHERE am.amname='btree' "
465+
"AND cls.relpersistence != 't' "
466+
"AND cls.relkind != 'I'::char "
465467
"ORDER BY nmspc.nspname DESC",
466468
0, NULL);
467469
}
@@ -473,8 +475,10 @@ get_index_list(const char *dbname, bool first_db_with_amcheck,
473475
"LEFT JOIN pg_catalog.pg_class cls ON idx.indexrelid=cls.oid "
474476
"LEFT JOIN pg_catalog.pg_namespace nmspc ON cls.relnamespace=nmspc.oid "
475477
"LEFT JOIN pg_catalog.pg_am am ON cls.relam=am.oid "
476-
"WHERE am.amname='btree' AND cls.relpersistence != 't' AND "
477-
"(cls.reltablespace IN "
478+
"WHERE am.amname='btree' "
479+
"AND cls.relpersistence != 't' "
480+
"AND cls.relkind != 'I'::char "
481+
"AND (cls.reltablespace IN "
478482
"(SELECT oid from pg_catalog.pg_tablespace where spcname <> 'pg_global') "
479483
"OR cls.reltablespace = 0) "
480484
"ORDER BY nmspc.nspname DESC",

0 commit comments

Comments
 (0)