This is for tracking planid into pg_stat_statements too. A first try is available here http://www.postgresql-archive.org/Poc-pg-stat-statements-with-planid-td6014027.html
reusing pg_stat_plans's "Plan tree Jumbling algorithm" from Peter Geoghegan. Hashing the normalized query plan text in one pass (that is also based on plan tree), compared to that Jumbling method seems simple to maintain (if explain works, planid is available and accurate). Today actual planid jumbling comes from pg9.3, doesn't compile anymore, and I'm not able to verify if declarativ partitionning is properly handled ... Would there be some functional or performances reasons to prefer jumbling to hashing normalized plan text? Regards PAscal -- Sent from: http://www.postgresql-archive.org/PostgreSQL-hackers-f1928748.html