Re: [Patch] New pg_stat_tablespace view

From: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>
To: shihao zhong <zhong950419(at)gmail(dot)com>
Cc: songjinzhou <tsinghualucky912(at)foxmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [Patch] New pg_stat_tablespace view
Date: 2026-03-24 22:11:01
Message-ID: CAN4CZFPf-VhzkXMsWjncXBVBc9vjw2tasJz99iN6MMCaMLna6g@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello!

blk_read_time and blk_write_time doesn't seem to work, they show 0 to
me even after some workloads, and I don't see any assignments in the
code. The testcase also checks for "blk_read_time >= 0" which
trivially succeeds.

blocks_fetched is also misleading, it includes both reads and cache
hits. pg_stat_database calls this column blocks_read, and properly
substracts blocks_hit from it.

+ rel->pgstat_info->reltablespace = rel->rd_locator.spcOid;

Shouldn't this be included in TwoPhasePgStatRecord / pgstat_twophase_postcommit?

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Zsolt Parragi 2026-03-24 22:21:19 Re: Add GoAway protocol message for graceful but fast server shutdown/switchover
Previous Message Zsolt Parragi 2026-03-24 21:56:56 Re: pg_get__*_ddl consolidation