Further dtrace adjustments for the backend-IDs-in-relpath patch.
authorRobert Haas
Sat, 14 Aug 2010 02:22:10 +0000 (02:22 +0000)
committerRobert Haas
Sat, 14 Aug 2010 02:22:10 +0000 (02:22 +0000)
Update the documentation, and back out a few ill-considered changes
whose folly I failed to realize for failure to read the documentation.

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

index ed35a1b92ab6e7a02cc1c01848d93086134d23d3..1c4d3ca4db4bf09b586647de903f08ae501f0452 100644 (file)
@@ -1,4 +1,4 @@
-
+
 
 
  Monitoring Database Activity
@@ -1436,26 +1436,28 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS procpid,
     
     
      buffer-read-start
-     (ForkNumber, BlockNumber, Oid, Oid, Oid, bool, bool)
+     (ForkNumber, BlockNumber, Oid, Oid, Oid, int, bool)
      Probe that fires when a buffer read is started.
       arg0 and arg1 contain the fork and block numbers of the page (but
       arg1 will be -1 if this is a relation extension request).
       arg2, arg3, and arg4 contain the tablespace, database, and relation OIDs
       identifying the relation.
-      arg5 is true for a local buffer, false for a shared buffer.
+      arg5 is the ID of the backend which created the temporary relation for a
+      local buffer, or InvalidBackendId (-1) for a shared buffer.
       arg6 is true for a relation extension request, false for normal
       read.
     
     
      buffer-read-done
-     (ForkNumber, BlockNumber, Oid, Oid, Oid, bool, bool, bool)
+     (ForkNumber, BlockNumber, Oid, Oid, Oid, int, bool, bool)
      Probe that fires when a buffer read is complete.
       arg0 and arg1 contain the fork and block numbers of the page (if this
       is a relation extension request, arg1 now contains the block number
       of the newly added block).
       arg2, arg3, and arg4 contain the tablespace, database, and relation OIDs
       identifying the relation.
-      arg5 is true for a local buffer, false for a shared buffer.
+      arg5 is the ID of the backend which created the temporary relation for a
+      local buffer, or InvalidBackendId (-1) for a shared buffer.
       arg6 is true for a relation extension request, false for normal
       read.
       arg7 is true if the buffer was found in the pool, false if not.
@@ -1521,38 +1523,46 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS procpid,
     
     
      smgr-md-read-start
-     (ForkNumber, BlockNumber, Oid, Oid, Oid)
+     (ForkNumber, BlockNumber, Oid, Oid, Oid, int)
      Probe that fires when beginning to read a block from a relation.
       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.
+      identifying the relation.
+      arg5 is the ID of the backend which created the temporary relation for a
+      local buffer, or InvalidBackendId (-1) for a shared buffer.
     
     
      smgr-md-read-done
-     (ForkNumber, BlockNumber, Oid, Oid, Oid, int, int)
+     (ForkNumber, BlockNumber, Oid, Oid, Oid, int, int, int)
      Probe that fires when a block 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 number of bytes actually read, while arg6 is the number
+      arg5 is the ID of the backend which created the temporary relation for a
+      local buffer, or InvalidBackendId (-1) for a shared buffer.
+      arg6 is the number of bytes actually read, while arg7 is the number
       requested (if these are different it indicates trouble).
     
     
      smgr-md-write-start
-     (ForkNumber, BlockNumber, Oid, Oid, Oid)
+     (ForkNumber, BlockNumber, Oid, Oid, Oid, int)
      Probe that fires when beginning to write a block to a relation.
       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.
+      identifying the relation.
+      arg5 is the ID of the backend which created the temporary relation for a
+      local buffer, or InvalidBackendId (-1) for a shared buffer.
     
     
      smgr-md-write-done
-     (ForkNumber, BlockNumber, Oid, Oid, Oid, int, int)
+     (ForkNumber, BlockNumber, Oid, Oid, Oid, int, int, int)
      Probe that fires when a block write 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 number of bytes actually written, while arg6 is the number
+      arg5 is the ID of the backend which created the temporary relation for a
+      local buffer, or InvalidBackendId (-1) for a shared buffer.
+      arg6 is the number of bytes actually written, while arg7 is the number
       requested (if these are different it indicates trouble).
     
     
index 7b3536335bea5a4787bb24ac34839cc637494b1b..e4f5dba0998bc83ea5309861035d540a4d206551 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *   $PostgreSQL: pgsql/src/backend/storage/buffer/bufmgr.c,v 1.258 2010/08/13 22:54:17 rhaas Exp $
+ *   $PostgreSQL: pgsql/src/backend/storage/buffer/bufmgr.c,v 1.259 2010/08/14 02:22:10 rhaas Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -1852,8 +1852,7 @@ FlushBuffer(volatile BufferDesc *buf, SMgrRelation reln)
                                        buf->tag.blockNum,
                                        reln->smgr_rnode.node.spcNode,
                                        reln->smgr_rnode.node.dbNode,
-                                       reln->smgr_rnode.node.relNode,
-                                       reln->smgr_rnode.backend);
+                                       reln->smgr_rnode.node.relNode);
 
    /*
     * Force XLOG flush up to buffer's LSN.  This implements the basic WAL
@@ -1892,8 +1891,7 @@ FlushBuffer(volatile BufferDesc *buf, SMgrRelation reln)
                                       buf->tag.blockNum,
                                       reln->smgr_rnode.node.spcNode,
                                       reln->smgr_rnode.node.dbNode,
-                                      reln->smgr_rnode.node.relNode,
-                                      reln->smgr_rnode.backend);
+                                      reln->smgr_rnode.node.relNode);
 
    /* Pop the error context stack */
    error_context_stack = errcontext.previous;
index 5158c0a06cf135c7afc41c825078f1b484fbdb8c..7ed8c4a27a1242995b343be8eff625c02b69c065 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 2006-2010, PostgreSQL Global Development Group
  *
- * $PostgreSQL: pgsql/src/backend/utils/probes.d,v 1.14 2010/08/13 22:54:17 rhaas Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/probes.d,v 1.15 2010/08/14 02:22:10 rhaas Exp $
  * ----------
  */
 
@@ -56,8 +56,8 @@ provider postgresql {
 
    probe buffer__read__start(ForkNumber, BlockNumber, Oid, Oid, Oid, int, bool);
    probe buffer__read__done(ForkNumber, BlockNumber, Oid, Oid, Oid, int, bool, bool);
-   probe buffer__flush__start(ForkNumber, BlockNumber, Oid, Oid, Oid, int);
-   probe buffer__flush__done(ForkNumber, BlockNumber, Oid, Oid, Oid, int);
+   probe buffer__flush__start(ForkNumber, BlockNumber, Oid, Oid, Oid);
+   probe buffer__flush__done(ForkNumber, BlockNumber, Oid, Oid, Oid);
 
    probe buffer__checkpoint__start(int);
    probe buffer__checkpoint__sync__start();