bufmgr: Remove buffer-write-dirty tracepoints
authorAndres Freund <andres@anarazel.de>
Tue, 4 Apr 2023 01:02:41 +0000 (18:02 -0700)
committerAndres Freund <andres@anarazel.de>
Tue, 4 Apr 2023 01:02:41 +0000 (18:02 -0700)
The trace point was using the relfileno / fork / block for the to-be-read-in
buffer. Some upcoming work would make that more expensive to provide. We still
have buffer-flush-start/done, which can serve most tracing needs that
buffer-write-dirty could serve.

Discussion: https://postgr.es/m/f5164e7a-eef6-8972-75a3-8ac622ed0c6e@iki.fi

doc/src/sgml/monitoring.sgml
src/backend/storage/buffer/bufmgr.c
src/backend/utils/probes.d

index d5a45f996d0dc3944f971b855409ebb01711b2a1..65da082ed9bbc42eb2d701395a4b7ebfeb7ff593 100644 (file)
@@ -7817,23 +7817,6 @@ FROM pg_stat_get_backend_idset() AS backendid;
       it's typically not actually been written to disk yet.)
       The arguments are the same as for <literal>buffer-flush-start</literal>.</entry>
     </row>
-    <row>
-     <entry><literal>buffer-write-dirty-start</literal></entry>
-     <entry><literal>(ForkNumber, BlockNumber, Oid, Oid, Oid)</literal></entry>
-     <entry>Probe that fires when a server process begins to write a dirty
-      buffer.  (If this happens often, it implies that
-      <xref linkend="guc-shared-buffers"/> is too
-      small or the background writer control parameters need adjustment.)
-      arg0 and arg1 contain the fork and block numbers of the page.
-      arg2, arg3, and arg4 contain the tablespace, database, and relation OIDs
-      identifying the relation.</entry>
-    </row>
-    <row>
-     <entry><literal>buffer-write-dirty-done</literal></entry>
-     <entry><literal>(ForkNumber, BlockNumber, Oid, Oid, Oid)</literal></entry>
-     <entry>Probe that fires when a dirty-buffer write is complete.
-      The arguments are the same as for <literal>buffer-write-dirty-start</literal>.</entry>
-    </row>
     <row>
      <entry><literal>wal-buffer-write-dirty-start</literal></entry>
      <entry><literal>()</literal></entry>
index b3adbbe7d2323bc270660f198d060191cd74afcf..7f119cd4b0f7869069d56af9b2f9974f8a89a922 100644 (file)
@@ -1280,21 +1280,11 @@ BufferAlloc(SMgrRelation smgr, char relpersistence, ForkNumber forkNum,
                }
 
                /* OK, do the I/O */
-               TRACE_POSTGRESQL_BUFFER_WRITE_DIRTY_START(forkNum, blockNum,
-                                                         smgr->smgr_rlocator.locator.spcOid,
-                                                         smgr->smgr_rlocator.locator.dbOid,
-                                                         smgr->smgr_rlocator.locator.relNumber);
-
                FlushBuffer(buf, NULL, IOOBJECT_RELATION, io_context);
                LWLockRelease(BufferDescriptorGetContentLock(buf));
 
                ScheduleBufferTagForWriteback(&BackendWritebackContext,
                                              &buf->tag);
-
-               TRACE_POSTGRESQL_BUFFER_WRITE_DIRTY_DONE(forkNum, blockNum,
-                                                        smgr->smgr_rlocator.locator.spcOid,
-                                                        smgr->smgr_rlocator.locator.dbOid,
-                                                        smgr->smgr_rlocator.locator.relNumber);
            }
            else
            {
index c064d679e94695077d5c402faea716ccd46985ab..204a2649b09178291ffc929dbc5da93b92c56fd4 100644 (file)
@@ -66,8 +66,6 @@ provider postgresql {
    probe buffer__sync__start(int, int);
    probe buffer__sync__written(int);
    probe buffer__sync__done(int, int, int);
-   probe buffer__write__dirty__start(ForkNumber, BlockNumber, Oid, Oid, Oid);
-   probe buffer__write__dirty__done(ForkNumber, BlockNumber, Oid, Oid, Oid);
 
    probe deadlock__found();