Hi Andres,

> Uh, what is the justification for keeping all of these also for
tablespaces?
> This could just as well be done on the querying side, no?

Thanks for pushing on this. v13 drops the tup_* columns, blks_hit and
blks_read. Those can be summed from the relation stats.

What is left cannot be. Block reads, writes and extends are counted
where pg_stat_io counts them. That includes the checkpointer and
recovery. With tablespaces on different devices, it shows where the
IO time goes.

I also split the giant patch into smaller pieces for easier review.

0001 is the view with the temporary file columns. It does not touch
bufmgr.

0002 adds pgstat_count_smgr_io_op_time(), which takes the SMgrRelation
instead of the IOObject. It keeps six arguments and changes no
behavior.

0003 releases references to dropped stats entries before the stats
file is written. With 0004 the checkpointer can hold one for a dropped
tablespace at shutdown, which fails an assertion.

0004 adds the block columns. Each relation block IO is counted once,
in a per tablespace copy of the pending pg_stat_io counts.

Let me know if you have any more concerns,

Thanks,
Shihao

Attachment: v13-0003-Release-references-to-dropped-stats-entries-before-w.patch
Description: Binary data

Attachment: v13-0004-Count-block-reads-writes-and-extends-per-tablespace.patch
Description: Binary data

Attachment: v13-0001-Add-pg_stat_tablespace-view-with-temporary-file-stat.patch
Description: Binary data

Attachment: v13-0002-Add-pgstat_count_smgr_io_op_time.patch
Description: Binary data

Reply via email to