Hello PostgreSQL Hackers,
I am submitting a patch to add hooks for the functions pg_total_relation_size and pg_indexes_size. These hooks allow for custom behaviour to be injected into these functions, which can be useful for extensions and other custom PostgreSQL modifications.
Patch details:
- Adds pg_total_relation_size_hook and pg_indexes_size_hook
- Modifies pg_total_relation_size and pg_indexes_size to call these hooks if they are set
- Adds necessary type definitions and extern declarations
This feature is useful because it allows for more flexible and customizable behaviour in relation size calculations, which can be particularly valuable for extensions that need to account for additional storage outside of the standard PostgreSQL mechanisms.
The patch is attached.
Thank you for considering this patch. I look forward to your feedback.
Kind regards,
Abdoulaye Ba