mfvanek / pg-index-health

pg-index-health is a Java library for analyzing and maintaining indexes and tables health in Postgresql databases.
Apache License 2.0
128 stars 15 forks source link

Retest all table checks with partitioned tables #467

Open mfvanek opened 3 weeks ago

mfvanek commented 3 weeks ago

See relkind We need to make sure that the appropriate checks work for partitioned tables

asharan2buff commented 3 weeks ago

Hello!! I can take this up

mfvanek commented 3 weeks ago

Hi @asharan2buff I've assigned issue to you

mfvanek commented 3 weeks ago

@asharan2buff please provide here sql queries to create a database for testing and then retest each query that retrieves information about tables

asharan2buff commented 3 weeks ago

@mfvanek could you expand a bit more on how to proceed. From what I understood so far, Do we need to add relkind ='p' check in all tests?

mfvanek commented 3 weeks ago

Do we need to add relkind ='p' check in all tests?

No, we don't, not right now.

Sample scenario:

1) Search for sql queries with relkind == 'r' https://github.com/search?q=repo%3Amfvanek%2Fpg-index-health-sql%20relkind%20&type=code

2) For each found check prepare a test with partitioned table. See https://github.com/mfvanek/pg-index-health-demo/tree/master/db-migrations/src/main/resources/db/changelog/sql or tests in https://github.com/mfvanek/pg-index-health/tree/master/pg-index-health-core/src/testFixtures/java/io/github/mfvanek/pg/support/statements

3) We need to figure out whether current implementation able to find problems with partitioned tables or not.

4) After that we can discuss the results and further steps.

asharan2buff commented 2 weeks ago

Got it...