Hi, You should search informations about postgres hooks like thoses used in extension pg_stat_statements https://github.com/postgres/postgres/blob/master/contrib/pg_stat_statements/pg_stat_statements.c
And about background capabilities as thoses used in extension pg_background https://github.com/vibhorkum/pg_background There are also extensions working with indexes like hypopg https://github.com/HypoPG/hypopg Good luck Regards PAscal -- Sent from: https://www.postgresql-archive.org/PostgreSQL-hackers-f1928748.html