Re: pg_stat_bgwriter.buffers_backend is pretty meaningless (and more?)
Melanie Plageman <melanieplageman@gmail.com>
Attachments
- v12-0004-Remove-superfluous-bgwriter-stats.patch (text/x-patch) patch v12-0004
- v12-0002-Add-utility-to-make-tuplestores-for-pg-stat-view.patch (text/x-patch) patch v12-0002
- v12-0001-Allow-bootstrap-process-to-beinit.patch (text/x-patch) patch v12-0001
- v12-0003-Add-system-view-tracking-accesses-to-buffers.patch (text/x-patch) patch v12-0003
On Wed, Sep 29, 2021 at 4:46 PM Melanie Plageman <melanieplageman@gmail.com> wrote: > > On Mon, Sep 27, 2021 at 2:58 PM Melanie Plageman > <melanieplageman@gmail.com> wrote: > > > > On Fri, Sep 24, 2021 at 5:58 PM Melanie Plageman > > <melanieplageman@gmail.com> wrote: > > > > > > On Thu, Sep 23, 2021 at 5:05 PM Melanie Plageman > > > <melanieplageman@gmail.com> wrote: > > > The only remaining TODOs are described in the commit message. > > > most critical one is that the reset message doesn't work. > > > > v10 is attached with updated comments and some limited code refactoring > > v11 has fixed the oversize message issue by sending a reset message for > each backend type. Now, we will call GetCurrentTimestamp > BACKEND_NUM_TYPES times, so maybe I should add some kind of flag to the > reset message that indicates the first message so that all the "do once" > things can be done at that point. > > I've also fixed a few style/cosmetic issues and updated the commit > message with a link to the thread [1] where I proposed smgrwrite() and > smgrextend() wrappers (which is where I propose to call > pgstat_incremement_buffer_access_type() for unbuffered writes and > extends). > > - Melanie > > [1] https://www.postgresql.org/message-id/CAAKRu_aw72w70X1P%3Dba20K8iGUvSkyz7Yk03wPPh3f9WgmcJ3g%40mail.gmail.com v12 (attached) has various style and code clarity updates (it is pgindented as well). I also added a new commit which creates a utility function to make a tuplestore for views that need one in pgstatfuncs.c. Having received some offlist feedback about the names BufferAccessType and BufferType being confusing, I am planning to rename these variables and all of the associated functions. I agree that BufferType and BufferAccessType are confusing for the following reasons: - They sound similar. - They aren't very precise. - One of the types of buffers is not using a Postgres buffer. So far, the proposed alternative is IO_Op or IOOp for BufferAccessType and IOPath for BufferType. - Melanie
Commits
-
Stabilize pg_stat_io writes test
- ef719e7b32fc 16.0 landed
-
Fix flakey pg_stat_io test
- 1be0fdb9de55 16.0 landed
-
Suppress more compiler warnings in new pgstats code.
- b1b86820d84e 16.0 landed
-
Suppress compiler warnings in new pgstats code.
- 728560db7d86 16.0 landed
-
Add tests for pg_stat_io
- 10a082bf7215 16.0 landed
-
Create regress_tblspc in test_setup
- 9c83bbcf7ef6 16.0 landed
-
Add pg_stat_io view, providing more detailed IO statistics
- a9c70b46dbe1 16.0 landed
-
pgstat: Track more detailed relation IO statistics
- f30d62c2fc60 16.0 landed
-
pgstat: Infrastructure for more detailed IO statistics
- 28e626bde00e 16.0 landed
-
doc: Fix some issues in logical replication section
- 4f74f5641d53 16.0 cited
-
Manual cleanup and pgindent of pgstat and bufmgr related code
- 250c8ee07ede 16.0 landed
-
Have the planner consider Incremental Sort for DISTINCT
- 3c6fc58209f2 16.0 cited
-
Use actual backend IDs in pg_stat_get_backend_idset() and friends.
- d7e39d72ca1c 16.0 cited
-
Remove redundant call to pgstat_report_wal()
- 1bdd54e662d5 16.0 landed
-
Add BackendType for standalone backends
- 0c679464a837 16.0 landed
-
Initialize backend status reporting during bootstrap.
- 3b34645678d1 15.0 landed