Home Explore Blog CI



postgresql

83th chunk of `doc/src/sgml/monitoring.sgml`
86271a235bfbd90fde4ab6cb66eab7926a5bac6dfbee76d80000000100000fc1
 <entry><literal>twophase-checkpoint-start</literal></entry>
     <entry><literal>()</literal></entry>
     <entry>Probe that fires when the two-phase portion of a checkpoint is
      started.</entry>
    </row>
    <row>
     <entry><literal>twophase-checkpoint-done</literal></entry>
     <entry><literal>()</literal></entry>
     <entry>Probe that fires when the two-phase portion of a checkpoint is
      complete.</entry>
    </row>
    <row>
     <entry><literal>buffer-extend-start</literal></entry>
     <entry><literal>(ForkNumber, BlockNumber, Oid, Oid, Oid, int, unsigned int)</literal></entry>
     <entry>Probe that fires when a relation extension starts.
       arg0 contains the fork to be extended. arg1, arg2, and arg3 contain the
       tablespace, database, and relation OIDs identifying the relation.  arg4
       is the ID of the backend which created the temporary relation for a
       local buffer, or <symbol>INVALID_PROC_NUMBER</symbol> (-1) for a shared
       buffer. arg5 is the number of blocks the caller would like to extend
       by.</entry>
    </row>
    <row>
     <entry><literal>buffer-extend-done</literal></entry>
     <entry><literal>(ForkNumber, BlockNumber, Oid, Oid, Oid, int, unsigned int, BlockNumber)</literal></entry>
     <entry>Probe that fires when a relation extension is complete.
       arg0 contains the fork to be extended. arg1, arg2, and arg3 contain the
       tablespace, database, and relation OIDs identifying the relation.  arg4
       is the ID of the backend which created the temporary relation for a
       local buffer, or <symbol>INVALID_PROC_NUMBER</symbol> (-1) for a shared
       buffer. arg5 is the number of blocks the relation was extended by, this
       can be less than the number in the
       <literal>buffer-extend-start</literal> due to resource
       constraints. arg6 contains the BlockNumber of the first new
       block.</entry>
    </row>
    <row>
     <entry><literal>buffer-read-start</literal></entry>
     <entry><literal>(ForkNumber, BlockNumber, Oid, Oid, Oid, int)</literal></entry>
     <entry>Probe that fires when a buffer read is started.
      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.
      arg5 is the ID of the backend which created the temporary relation for a
      local buffer, or <symbol>INVALID_PROC_NUMBER</symbol> (-1) for a shared buffer.
      </entry>
    </row>
    <row>
     <entry><literal>buffer-read-done</literal></entry>
     <entry><literal>(ForkNumber, BlockNumber, Oid, Oid, Oid, int, bool)</literal></entry>
     <entry>Probe that fires when a buffer read is complete.
      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.
      arg5 is the ID of the backend which created the temporary relation for a
      local buffer, or <symbol>INVALID_PROC_NUMBER</symbol> (-1) for a shared buffer.
      arg6 is true if the buffer was found in the pool, false if not.</entry>
    </row>
    <row>
     <entry><literal>buffer-flush-start</literal></entry>
     <entry><literal>(ForkNumber, BlockNumber, Oid, Oid, Oid)</literal></entry>
     <entry>Probe that fires before issuing any write request for a shared
      buffer.
      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-flush-done</literal></entry>
     <entry><literal>(ForkNumber, BlockNumber, Oid, Oid, Oid)</literal></entry>
     <entry>Probe that fires when a write request is complete.  (Note
      that this just reflects the time to pass the data to the kernel;
      it's typically not actually been written to disk yet.)
      The arguments are the same as for <literal>buffer-flush-start</literal>.</entry>

Title: Built-in DTrace Probes in PostgreSQL (Two-Phase Checkpoint, Buffer Extension, Read, and Flush)
Summary
This section describes DTrace probes in PostgreSQL related to two-phase checkpoints, buffer extension, buffer reads, and buffer flushes. It details probes that fire at the start and end of two-phase checkpoints. For buffer extensions, it provides probes that fire at the start and end of the extension, giving information about forks, tablespaces, databases, relations, and the number of blocks extended. The buffer read probes indicate when a buffer read starts and completes, specifying the fork, block number, relation identifiers, and whether the buffer was found in the pool. The buffer flush probes are triggered before and after write requests for shared buffers, providing fork, block number, and relation OIDs.