I want to maintain an internal table which the primary key is sql_text and planstmt::text, it is efficient since it both may be very long. So a general idea is to use sql_hash_value and plan_hash_value. Then we have to handle the hash collision case. However I checked the codes both in sr_plans[1] and pg_stat_statements[2], both of them didn't handle such cases, IIUC. so how can I understand this situation?
[1] https://github.com/postgrespro/sr_plan/blob/41d96bf136ec072dac77dddf8d9765bba39190ff/sr_plan.c#L383 [2] https://github.com/postgres/postgres/blob/master/contrib/pg_stat_statements/pg_stat_statements.c#L154 -- Best Regards Andy Fan