Skip to content

Commit 4cde879

Browse files
Merge pull request #555 from postgrespro/revert-498-PBCKP-120
Revert "[PBCKP-120] skip partitioned indexes for checkdb --amcheck"
2 parents dfb8b1f + 79009c6 commit 4cde879

File tree

2 files changed

+3
-16
lines changed

2 files changed

+3
-16
lines changed

src/checkdb.c

+3-7
Original file line numberDiff line numberDiff line change
@@ -461,9 +461,7 @@ 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' "
465-
"AND cls.relpersistence != 't' "
466-
"AND cls.relkind != 'I' "
464+
"WHERE am.amname='btree' AND cls.relpersistence != 't' "
467465
"ORDER BY nmspc.nspname DESC",
468466
0, NULL);
469467
}
@@ -475,10 +473,8 @@ get_index_list(const char *dbname, bool first_db_with_amcheck,
475473
"LEFT JOIN pg_catalog.pg_class cls ON idx.indexrelid=cls.oid "
476474
"LEFT JOIN pg_catalog.pg_namespace nmspc ON cls.relnamespace=nmspc.oid "
477475
"LEFT JOIN pg_catalog.pg_am am ON cls.relam=am.oid "
478-
"WHERE am.amname='btree' "
479-
"AND cls.relpersistence != 't' "
480-
"AND cls.relkind != 'I' "
481-
"AND (cls.reltablespace IN "
476+
"WHERE am.amname='btree' AND cls.relpersistence != 't' AND "
477+
"(cls.reltablespace IN "
482478
"(SELECT oid from pg_catalog.pg_tablespace where spcname <> 'pg_global') "
483479
"OR cls.reltablespace = 0) "
484480
"ORDER BY nmspc.nspname DESC",

tests/checkdb.py

-9
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,6 @@ def test_checkdb_amcheck_only_sanity(self):
3838
node.safe_psql(
3939
"postgres",
4040
"create index on t_heap(id)")
41-
42-
node.safe_psql(
43-
"postgres",
44-
"create table idxpart (a int) "
45-
"partition by range (a)")
46-
47-
node.safe_psql(
48-
"postgres",
49-
"create index on idxpart(a)")
5041

5142
try:
5243
node.safe_psql(

0 commit comments

Comments
 (0)