another case where I got error like partition table index is not a index is given below.
postgres=# create table part(a int, constraint part_pk primary key(a)) PARTITION BY RANGE(a);
CREATE TABLE
postgres=# create table part_p1 partition of part for values from (minvalue) to (0);
CREATE TABLE
postgres=# create table part_p2 partition of part for values from (0) to (maxvalue);
CREATE TABLE
postgres=# create EXTENSION if not exists pgstattuple;
CREATE EXTENSION
postgres=# select pgstatindex('part_p1_pkey');
pgstatindex
------------------------------
(3,0,8192,0,0,0,0,0,NaN,NaN)
(1 row)
postgres=# select pgstatindex('part_pk');
ERROR: relation "part_pk" is not a btree index
postgres=#