public inbox for [email protected]
help / color / mirror / Atom feedFrom: songjinzhou <[email protected]>
To: shihao zhong <[email protected]>
To: PostgreSQL-development <[email protected]>
Subject: Re: [Patch] New pg_stat_tablespace view
Date: Tue, 24 Mar 2026 15:22:29 +0800
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAGRkXqRp+mK_uuCEp+wuBvuvFf_1v=MGC6Dd6HgJigJUzZanHg@mail.gmail.com>
References: <CAGRkXqRHsZw3+aeNZgnBYduQSY7qg1O4MBdmyFjK-A+TU1-b-A@mail.gmail.com>
<CAGRkXqRp+mK_uuCEp+wuBvuvFf_1v=MGC6Dd6HgJigJUzZanHg@mail.gmail.com>
在 2026/3/24 10:49, shihao zhong 写道:
> On Mon, Mar 23, 2026 at 3:08 PM shihao zhong <[email protected]> wrote:
>>
>> Hi hackers,
>>
>> I’ve been working on extending the cumulative statistics system to
>> provide better visibility into tablespace-level workloads, and I'd
>> like to propose a patch to add a new system view: pg_stat_tablespace.
>>
>> Currently, PostgreSQL provides statistics per database (e.g.,
>> pg_stat_database) and per relation (e.g., pg_statio_user_tables).
>> However, because tablespaces can span multiple databases, it is
>> difficult for DBAs to analyze storage hotspots across the cluster or
>> verify if a specific tablespace (such as a high-performance SSD vs a
>> slow HDD array) is experiencing I/O bottlenecks or excessive temporary
>> file usage.
>>
>> The pg_stat_tablespace view bridges this gap by providing an aggregate
>> view of block I/O and temporary file usage grouped by tablespace,
>> making it easier to optimize storage architectures.
>>
>> Thanks,
>> Shihao
>
> New version fix the CI/CD
Hello, shihao
I applied it on master and did a simple test. Here are some minor review
comments:
1. The type of temp_bytes in monitoring.sgml should be bigint, but it
was written as numeric here.
2. The pgstat_drop_tablespace function doesn't seem to be called.
Thank you.
--
regards,
songjinzhou
view thread (8+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: [Patch] New pg_stat_tablespace view
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox