pg_stat_io: track I/O for Append-Optimized (AO/AOCO) tables
Maintainer thường phản hồi trong vòng 3 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- c, postgresql
- Lĩnh vực
- databases, observability
Hướng nghiên cứu
Bắt đầu bằng cách đọc pgstat_io.c, pgstat.h và các định nghĩa pg_stat_io trong system_views.sql, sau đó kiểm tra BufferedRead và BufferedAppend trong src/backend/access/appendonly và src/backend/access/aocs. So sánh việc instrument chúng với bufmgr.c, localbuf.c và md.c. Hoàn tất khi các thao tác đọc, ghi, mở rộng và fsync của AO/AOCO được thể hiện nhất quán trong pg_stat_io và các view gp_stat_io liên quan.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
pg_stat_io (inherited from the PostgreSQL 16 merge) gives per-backend,
per-IO-object, per-context I/O statistics, and Cloudberry already exposes
cluster-wide rollups via gp_stat_io and gp_stat_io_summary. However, the
underlying counters are only incremented on the shared-buffer-manager path
(bufmgr.c, localbuf.c, md.c). Append-Optimized (AO) and
Append-Optimized Column-Oriented (AOCO) table I/O is not counted at all.
Because AO/AOCO storage bypasses the shared buffer pool and uses its own
BufferedRead / BufferedAppend layer, reads, writes, and extends against
these tables are invisible to pg_stat_io. For a workload built primarily on
AO/AOCO tables — which is common in Cloudberry analytics deployments — the view
significantly under-reports actual physical I/O.
Current behavior
grep -rn pgstat_count_io_op src/backend/access/appendonly src/backend/access/aocs
returns no matches — the AO/AOCO read/write paths contain no
instrumentation.- I/O counters are populated only from
bufmgr.c,localbuf.c, andmd.c,
i.e. the heap / index / temp-relation paths inherited from PostgreSQL. - As a result,
pg_stat_io(andgp_stat_io/gp_stat_io_summary) reflect
heap/index/catalog I/O but omit the storage format that defines Cloudberry.
Expected behavior
I/O performed by AO/AOCO tables should be reflected in pg_stat_io, so that
operators can observe physical I/O for the storage types they actually use.
Proposed approach (for discussion)
Instrument the AO/AOCO buffered I/O layer with pgstat_count_io_op[_time]()
calls, analogous to the existing md.c instrumentation:
- Reads — in the AO/AOCO
BufferedReadpath (bufmgrequivalent for AO),
countIOOP_READ. - Writes / extends — in the
BufferedAppend/ segment-file extend path,
countIOOP_WRITEandIOOP_EXTEND. - fsync — where AO segment files are flushed (
register_dirty_segment/
mdimmedsyncequivalents).
Open design questions:
- IOOBJECT classification. AO/AOCO data does not live in shared buffers,
soIOOBJECT_RELATION(which today implies buffer-pool involvement) may be
misleading. Options: reuseIOOBJECT_RELATION, or add a new IO object
(e.g.IOOBJECT_AO_RELATION) to keep AO I/O distinguishable. Adding an enum
value changes the fixed-size shared stats struct and the
pg_stat_io/pg_stat_get_io()output shape, so it needs care. - IOCONTEXT mapping. AO has no shared-buffer eviction/reuse semantics, so
hits/evictions/reusesare not meaningful; only
reads/writes/extends/fsyncswould be populated. Decide how the
non-applicable columns are reported (zero vs. NULL). op_bytes. AO varblocks are variable-sized rather thanBLCKSZ-aligned,
so the per-op byte accounting differs from the heap path.
Impact / motivation
- Observability parity: AO/AOCO is the primary storage format for many
Cloudberry analytics workloads, yet is the one formatpg_stat_iocan't see. - Capacity planning & troubleshooting: physical read/write volume for AO tables
is currently only obtainable indirectly.
Notes
- Affects:
main. - Related existing surfaces:
pg_stat_ioview (system_views.sql),
gp_stat_io/gp_stat_io_summary(system_views_gp*.sql),
pgstat_io.c,pgstat.hIO enums.
- Ngôn ngữ chính
- C
- Star
- 1.4k
- Fork
- 262
- Merge trung bình
- 4 ngày 20 giờ
- Pull request đã merge (30 ngày)
- 57
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của apache/cloudberry
-
[Bug] Expand fails to recognize user-defined tablespacesCó thể đã có người làm @nix-oss đã nhận 61 ngày trước. Đang mởtype: Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
apache/cloudberry#1885 · 2 reaction ·
Maintainer thường phản hồi trong vòng 3 ngày
-
gpexpand first stage fails: 'SyncPackages' object has no attribute 'ret' (extension sync never runs; regression)Có thể đã có người làm @talmacschen-arch đã nhận 122 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
apache/cloudberry#1825 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Lance support: contrib/lance_fdw and the MCP server's Lance toolsCó thể đã có người làm @MisterRaindrop đã nhận 2 ngày trước. Đang mở
apache/cloudberry#2139 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 3 ngày
-
type: Bug
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 58/100
apache/cloudberry#2137 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
type: Proposal
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 22/100
apache/cloudberry#2136 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
Tất cả issue của apache/cloudberry
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 91/100
FujiNetWIFI/fujinet-firmware#2045 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
gbdev/homebrewhub-submit#20 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
OpenPrinting/cups#1772 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
snowballstem/snowball#311 ·