Improve performance of find_all_inheritors()

Teodor Sigaev <teodor@sigaev.ru>

Commit: 827d6f977940952ebef4bd21fb0f97be4e20c0c4
Author: Teodor Sigaev <teodor@sigaev.ru>
Date: 2017-03-27T16:07:48Z
Releases: 10.0
Improve performance of find_all_inheritors()

Previous coding uses three nested loops which obviously were a pain for
large number of table's children. Patch replaces inner loop with
a hashmap.

Author: Aleksander Alekseev
Reviewed-by: me

https://commitfest.postgresql.org/13/1058/

Files

PathChange+/−
src/backend/catalog/pg_inherits.c modified +44 −14