The missing indexes query is not partitioning_aware. In a db made with pgbench --foreign-keys --partitions=2, I get this:
pgbench_accounts ║ CREATE INDEX CONCURRENTLY idx_pgbench_accounts_bid ON pgbench_accounts (bid) ;
pgbench_accounts_1 ║ CREATE INDEX CONCURRENTLY idx_pgbench_accounts_1_bid ON pgbench_accounts_1 (bid) ;
pgbench_accounts_2 ║ CREATE INDEX CONCURRENTLY idx_pgbench_accounts_2_bid ON pgbench_accounts_2 (bid) ;
It seems that this check solves the problem:
AND NOT pg_class.relispartition --v10
AND pg_constraint.conparentid = 0 --v11
The missing indexes query is not partitioning_aware. In a db made with
pgbench --foreign-keys --partitions=2
, I get this:It seems that this check solves the problem:
I may try a PR once #152 is finished.