ossc-db / pg_store_plans

Store execution plans like pg_stat_statements does for queries.
http://ossc-db.github.io/pg_store_plans/
Other
53 stars 26 forks source link

pg11: pg_stat_statements.queryid format has changed #2

Closed legrandlegrand closed 5 years ago

legrandlegrand commented 6 years ago

Hello, I'm very pleased that this extension generates its queryid and planid by hashing normalized queries (like that queries and plans can be compared between environments, not like with pg_stat_statements ;o)

It seems that pg_stat_statements.queryid format has changed (with pg11 ?). pg_store_plans.queryid_stat_statements should be changed accordingly to be able to join the two relations.

Could this be fixed ?

Regards PAscal

legrandlegrand commented 6 years ago

this was modified by commit pg_stat_statements: Widen query IDs from 32 bits to 64 bits. https://github.com/postgres/postgres/commit/cff440d368690f94fbda1a475277e90ea2263843

workaround that would have been using pg_store_plans_hash_query(s.query)) = p.queryid doesn't work any more cause query text normalization has changed too see Show ignored constants as "$N" rather than "?" in pg_stat_statements. https://github.com/postgres/postgres/commit/a6f22e83562d8b78293229587cd3d9430d16d466

Regards PAscal

legrandlegrand commented 5 years ago

Fixed