PATCH: Add hooks for pg_total_relation_size and pg_indexes_size

From: Abdoulaye Ba <abdoulayeba29(at)gmail(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: PATCH: Add hooks for pg_total_relation_size and pg_indexes_size
Date: 2024-08-08 12:18:14
Message-ID: CA+-ifOaCGFcv0KuTwU-Y83a2kwL+CTG+7frx4khxJt3KQN+GUQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

Attachment Content-Type Size
combined.patch text/x-patch 2.7 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2024-08-08 12:23:22 Re: Found issues related with logical replication and 2PC
Previous Message Nazir Bilal Yavuz 2024-08-08 12:15:42 Re: CREATE DATABASE with filesystem cloning