The dtrace probes documentation [1] spells each probe name with dashes
("transaction-start", "transaction-commit", etc.). Yet as far as I can see,
dtrace only works if you spell the probe names with double underscores
("transaction__start", "transaction__commit", etc.). Why the discrepancy?
Obvious patch attached, in case this needs to be changed.

- Josh / eggyknap

1: http://www.postgresql.org/docs/8.4/static/dynamic-trace.html

diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml
index ea8b017..672a1fe 100644
--- a/doc/src/sgml/monitoring.sgml
+++ b/doc/src/sgml/monitoring.sgml
@@ -1070,95 +1070,95 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS procpid,
    <tbody>
 
     <row>
-     <entry>transaction-start</entry>
+     <entry>transaction__start</entry>
      <entry>(LocalTransactionId)</entry>
      <entry>Probe that fires at the start of a new transaction.
       arg0 is the transaction id.</entry>
     </row>
     <row>
-     <entry>transaction-commit</entry>
+     <entry>transaction__commit</entry>
      <entry>(LocalTransactionId)</entry>
      <entry>Probe that fires when a transaction completes successfully.
       arg0 is the transaction id.</entry>
     </row>
     <row>
-     <entry>transaction-abort</entry>
+     <entry>transaction__abort</entry>
      <entry>(LocalTransactionId)</entry>
      <entry>Probe that fires when a transaction completes unsuccessfully.
       arg0 is the transaction id.</entry>
     </row>
     <row>
-     <entry>query-start</entry>
+     <entry>query__start</entry>
      <entry>(const char *)</entry>
      <entry>Probe that fires when the processing of a query is started.
       arg0 is the query string.</entry>
     </row>
     <row>
-     <entry>query-done</entry>
+     <entry>query__done</entry>
      <entry>(const char *)</entry>
      <entry>Probe that fires when the processing of a query is complete.
       arg0 is the query string.</entry>
     </row>
     <row>
-     <entry>query-parse-start</entry>
+     <entry>query__parse__start</entry>
      <entry>(const char *)</entry>
      <entry>Probe that fires when the parsing of a query is started.
       arg0 is the query string.</entry>
     </row>
     <row>
-     <entry>query-parse-done</entry>
+     <entry>query__parse__done</entry>
      <entry>(const char *)</entry>
      <entry>Probe that fires when the parsing of a query is complete.
       arg0 is the query string.</entry>
     </row>
     <row>
-     <entry>query-rewrite-start</entry>
+     <entry>query__rewrite__start</entry>
      <entry>(const char *)</entry>
      <entry>Probe that fires when the rewriting of a query is started.
       arg0 is the query string.</entry>
     </row>
     <row>
-     <entry>query-rewrite-done</entry>
+     <entry>query__rewrite__done</entry>
      <entry>(const char *)</entry>
      <entry>Probe that fires when the rewriting of a query is complete.
       arg0 is the query string.</entry>
     </row>
     <row>
-     <entry>query-plan-start</entry>
+     <entry>query__plan__start</entry>
      <entry>()</entry>
      <entry>Probe that fires when the planning of a query is started.</entry>
     </row>
     <row>
-     <entry>query-plan-done</entry>
+     <entry>query__plan__done</entry>
      <entry>()</entry>
      <entry>Probe that fires when the planning of a query is complete.</entry>
     </row>
     <row>
-     <entry>query-execute-start</entry>
+     <entry>query__execute__start</entry>
      <entry>()</entry>
      <entry>Probe that fires when the execution of a query is started.</entry>
     </row>
     <row>
-     <entry>query-execute-done</entry>
+     <entry>query__execute__done</entry>
      <entry>()</entry>
      <entry>Probe that fires when the execution of a query is complete.</entry>
     </row>
     <row>
-     <entry>statement-status</entry>
+     <entry>statement__status</entry>
      <entry>(const char *)</entry>
      <entry>Probe that fires anytime the server process updates its
       <structname>pg_stat_activity</>.<structfield>current_query</> status.
       arg0 is the new status string.</entry>
     </row>
     <row>
-     <entry>checkpoint-start</entry>
+     <entry>checkpoint__start</entry>
      <entry>(int)</entry>
      <entry>Probe that fires when a checkpoint is started.
       arg0 holds the bitwise flags used to distinguish different checkpoint
       types, such as shutdown, immediate or force.</entry>
     </row>
     <row>
-     <entry>checkpoint-done</entry>
+     <entry>checkpoint__done</entry>
      <entry>(int, int, int, int, int)</entry>
      <entry>Probe that fires when a checkpoint is complete.
       (The probes listed next fire in sequence during checkpoint processing.)
@@ -1167,20 +1167,20 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS procpid,
       removed and recycled respectively.</entry>
     </row>
     <row>
-     <entry>clog-checkpoint-start</entry>
+     <entry>clog__checkpoint__start</entry>
      <entry>(bool)</entry>
      <entry>Probe that fires when the CLOG portion of a checkpoint is started.
       arg0 is true for normal checkpoint, false for shutdown
       checkpoint.</entry>
     </row>
     <row>
-     <entry>clog-checkpoint-done</entry>
+     <entry>clog__checkpoint__done</entry>
      <entry>(bool)</entry>
      <entry>Probe that fires when the CLOG portion of a checkpoint is
-      complete. arg0 has the same meaning as for clog-checkpoint-start.</entry>
+      complete. arg0 has the same meaning as for 
clog__checkpoint__start.</entry>
     </row>
     <row>
-     <entry>subtrans-checkpoint-start</entry>
+     <entry>subtrans__checkpoint__start</entry>
      <entry>(bool)</entry>
      <entry>Probe that fires when the SUBTRANS portion of a checkpoint is
       started.
@@ -1188,14 +1188,14 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS procpid,
       checkpoint.</entry>
     </row>
     <row>
-     <entry>subtrans-checkpoint-done</entry>
+     <entry>subtrans__checkpoint__done</entry>
      <entry>(bool)</entry>
      <entry>Probe that fires when the SUBTRANS portion of a checkpoint is
       complete. arg0 has the same meaning as for
-      subtrans-checkpoint-start.</entry>
+      subtrans__checkpoint__start.</entry>
     </row>
     <row>
-     <entry>multixact-checkpoint-start</entry>
+     <entry>multixact__checkpoint__start</entry>
      <entry>(bool)</entry>
      <entry>Probe that fires when the MultiXact portion of a checkpoint is
       started.
@@ -1203,14 +1203,14 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS procpid,
       checkpoint.</entry>
     </row>
     <row>
-     <entry>multixact-checkpoint-done</entry>
+     <entry>multixact__checkpoint__done</entry>
      <entry>(bool)</entry>
      <entry>Probe that fires when the MultiXact portion of a checkpoint is
       complete. arg0 has the same meaning as for
-      multixact-checkpoint-start.</entry>
+      multixact__checkpoint__start.</entry>
     </row>
     <row>
-     <entry>buffer-checkpoint-start</entry>
+     <entry>buffer__checkpoint__start</entry>
      <entry>(int)</entry>
      <entry>Probe that fires when the buffer-writing portion of a checkpoint
       is started.
@@ -1218,7 +1218,7 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS procpid,
       types, such as shutdown, immediate or force.</entry>
     </row>
     <row>
-     <entry>buffer-sync-start</entry>
+     <entry>buffer__sync__start</entry>
      <entry>(int, int)</entry>
      <entry>Probe that fires when we begin to write dirty buffers during
       checkpoint (after identifying which buffers must be written).
@@ -1226,47 +1226,47 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS procpid,
       arg1 is the number that are currently dirty and need to be 
written.</entry>
     </row>
     <row>
-     <entry>buffer-sync-written</entry>
+     <entry>buffer__sync__written</entry>
      <entry>(int)</entry>
      <entry>Probe that fires after each buffer is written during checkpoint.
       arg0 is the ID number of the buffer.</entry>
     </row>
     <row>
-     <entry>buffer-sync-done</entry>
+     <entry>buffer__sync__done</entry>
      <entry>(int, int, int)</entry>
      <entry>Probe that fires when all dirty buffers have been written.
       arg0 is the total number of buffers.
       arg1 is the number of buffers actually written by the checkpoint process.
       arg2 is the number that were expected to be written (arg1 of
-      buffer-sync-start); any difference reflects other processes flushing
+      buffer__sync__start); any difference reflects other processes flushing
       buffers during the checkpoint.</entry>
     </row>
     <row>
-     <entry>buffer-checkpoint-sync-start</entry>
+     <entry>buffer__checkpoint__sync__start</entry>
      <entry>()</entry>
      <entry>Probe that fires after dirty buffers have been written to the
       kernel, and before starting to issue fsync requests.</entry>
     </row>
     <row>
-     <entry>buffer-checkpoint-done</entry>
+     <entry>buffer__checkpoint__done</entry>
      <entry>()</entry>
      <entry>Probe that fires when syncing of buffers to disk is
       complete.</entry>
     </row>
     <row>
-     <entry>twophase-checkpoint-start</entry>
+     <entry>twophase__checkpoint__start</entry>
      <entry>()</entry>
      <entry>Probe that fires when the two-phase portion of a checkpoint is
       started.</entry>
     </row>
     <row>
-     <entry>twophase-checkpoint-done</entry>
+     <entry>twophase__checkpoint__done</entry>
      <entry>()</entry>
      <entry>Probe that fires when the two-phase portion of a checkpoint is
       complete.</entry>
     </row>
     <row>
-     <entry>buffer-read-start</entry>
+     <entry>buffer__read__start</entry>
      <entry>(ForkNumber, BlockNumber, Oid, Oid, Oid, bool, bool)</entry>
      <entry>Probe that fires when a buffer read is started.
       arg0 and arg1 contain the fork and block numbers of the page (but
@@ -1278,7 +1278,7 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS procpid,
       read.</entry>
     </row>
     <row>
-     <entry>buffer-read-done</entry>
+     <entry>buffer__read__done</entry>
      <entry>(ForkNumber, BlockNumber, Oid, Oid, Oid, bool, bool, bool)</entry>
      <entry>Probe that fires when a buffer read is complete.
       arg0 and arg1 contain the fork and block numbers of the page (if this
@@ -1292,7 +1292,7 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS procpid,
       arg7 is true if the buffer was found in the pool, false if not.</entry>
     </row>
     <row>
-     <entry>buffer-flush-start</entry>
+     <entry>buffer__flush__start</entry>
      <entry>(ForkNumber, BlockNumber, Oid, Oid, Oid)</entry>
      <entry>Probe that fires before issuing any write request for a shared
       buffer.
@@ -1301,15 +1301,15 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS procpid,
       identifying the relation.</entry>
     </row>
     <row>
-     <entry>buffer-flush-done</entry>
+     <entry>buffer__flush__done</entry>
      <entry>(ForkNumber, BlockNumber, Oid, Oid, Oid)</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 buffer-flush-start.</entry>
+      The arguments are the same as for buffer__flush__start.</entry>
     </row>
     <row>
-     <entry>buffer-write-dirty-start</entry>
+     <entry>buffer__write__dirty__start</entry>
      <entry>(ForkNumber, BlockNumber, Oid, Oid, Oid)</entry>
      <entry>Probe that fires when a server process begins to write a dirty
       buffer.  (If this happens often, it implies that
@@ -1320,13 +1320,13 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS procpid,
       identifying the relation.</entry>
     </row>
     <row>
-     <entry>buffer-write-dirty-done</entry>
+     <entry>buffer__write__dirty__done</entry>
      <entry>(ForkNumber, BlockNumber, Oid, Oid, Oid)</entry>
      <entry>Probe that fires when a dirty-buffer write is complete.
-      The arguments are the same as for buffer-write-dirty-start.</entry>
+      The arguments are the same as for buffer__write__dirty__start.</entry>
     </row>
     <row>
-     <entry>wal-buffer-write-dirty-start</entry>
+     <entry>wal__buffer__write__dirty__start</entry>
      <entry>()</entry>
      <entry>Probe that fires when when a server process begins to write a
       dirty WAL buffer because no more WAL buffer space is available.
@@ -1334,24 +1334,24 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS procpid,
       <xref linkend="guc-wal-buffers"> is too small.)</entry>
     </row>
     <row>
-     <entry>wal-buffer-write-dirty-done</entry>
+     <entry>wal__buffer__write__dirty__done</entry>
      <entry>()</entry>
      <entry>Probe that fires when a dirty WAL buffer write is complete.</entry>
     </row>
     <row>
-     <entry>xlog-insert</entry>
+     <entry>xlog__insert</entry>
      <entry>(unsigned char, unsigned char)</entry>
      <entry>Probe that fires when a WAL record is inserted.
       arg0 is the resource manager (rmid) for the record.
       arg1 contains the info flags.</entry>
     </row>
     <row>
-     <entry>xlog-switch</entry>
+     <entry>xlog__switch</entry>
      <entry>()</entry>
      <entry>Probe that fires when a WAL segment switch is requested.</entry>
     </row>
     <row>
-     <entry>smgr-md-read-start</entry>
+     <entry>smgr__md__read__start</entry>
      <entry>(ForkNumber, BlockNumber, Oid, Oid, Oid)</entry>
      <entry>Probe that fires when beginning to read a block from a relation.
       arg0 and arg1 contain the fork and block numbers of the page.
@@ -1359,7 +1359,7 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS procpid,
       identifying the relation.</entry>
     </row>
     <row>
-     <entry>smgr-md-read-done</entry>
+     <entry>smgr__md__read__done</entry>
      <entry>(ForkNumber, BlockNumber, Oid, Oid, Oid, int, int)</entry>
      <entry>Probe that fires when a block read is complete.
       arg0 and arg1 contain the fork and block numbers of the page.
@@ -1369,7 +1369,7 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS procpid,
       requested (if these are different it indicates trouble).</entry>
     </row>
     <row>
-     <entry>smgr-md-write-start</entry>
+     <entry>smgr__md__write__start</entry>
      <entry>(ForkNumber, BlockNumber, Oid, Oid, Oid)</entry>
      <entry>Probe that fires when beginning to write a block to a relation.
       arg0 and arg1 contain the fork and block numbers of the page.
@@ -1377,7 +1377,7 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS procpid,
       identifying the relation.</entry>
     </row>
     <row>
-     <entry>smgr-md-write-done</entry>
+     <entry>smgr__md__write__done</entry>
      <entry>(ForkNumber, BlockNumber, Oid, Oid, Oid, int, int)</entry>
      <entry>Probe that fires when a block write is complete.
       arg0 and arg1 contain the fork and block numbers of the page.
@@ -1387,7 +1387,7 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS procpid,
       requested (if these are different it indicates trouble).</entry>
     </row>
     <row>
-     <entry>sort-start</entry>
+     <entry>sort__start</entry>
      <entry>(int, bool, int, int, bool)</entry>
      <entry>Probe that fires when a sort operation is started.
       arg0 indicates heap, index or datum sort.
@@ -1397,7 +1397,7 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS procpid,
       arg4 is true if random access to the sort result is required.</entry>
     </row>
     <row>
-     <entry>sort-done</entry>
+     <entry>sort__done</entry>
      <entry>(bool, long)</entry>
      <entry>Probe that fires when a sort is complete.
       arg0 is true for external sort, false for internal sort.
@@ -1405,21 +1405,21 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS procpid,
       or kilobytes of memory used for an internal sort.</entry>
     </row>
     <row>
-     <entry>lwlock-acquire</entry>
+     <entry>lwlock__acquire</entry>
      <entry>(LWLockId, LWLockMode)</entry>
      <entry>Probe that fires when an LWLock has been acquired.
       arg0 is the LWLock's ID.
       arg1 is the requested lock mode, either exclusive or shared.</entry>
     </row>
     <row>
-     <entry>lwlock-release</entry>
+     <entry>lwlock__release</entry>
      <entry>(LWLockId)</entry>
      <entry>Probe that fires when an LWLock has been released (but note
       that any released waiters have not yet been awakened).
       arg0 is the LWLock's ID.</entry>
     </row>
     <row>
-     <entry>lwlock-wait-start</entry>
+     <entry>lwlock__wait__start</entry>
      <entry>(LWLockId, LWLockMode)</entry>
      <entry>Probe that fires when an LWLock was not immediately available and
       a server process has begun to wait for the lock to become available.
@@ -1427,7 +1427,7 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS procpid,
       arg1 is the requested lock mode, either exclusive or shared.</entry>
     </row>
     <row>
-     <entry>lwlock-wait-done</entry>
+     <entry>lwlock__wait__done</entry>
      <entry>(LWLockId, LWLockMode)</entry>
      <entry>Probe that fires when a server process has been released from its
       wait for an LWLock (it does not actually have the lock yet).
@@ -1435,7 +1435,7 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS procpid,
       arg1 is the requested lock mode, either exclusive or shared.</entry>
     </row>
     <row>
-     <entry>lwlock-condacquire</entry>
+     <entry>lwlock__condacquire</entry>
      <entry>(LWLockId, LWLockMode)</entry>
      <entry>Probe that fires when an LWLock was successfully acquired when the
       caller specified no waiting.
@@ -1443,7 +1443,7 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS procpid,
       arg1 is the requested lock mode, either exclusive or shared.</entry>
     </row>
     <row>
-     <entry>lwlock-condacquire-fail</entry>
+     <entry>lwlock__condacquire__fail</entry>
      <entry>(LWLockId, LWLockMode)</entry>
      <entry>Probe that fires when an LWLock was not successfully acquired when
       the caller specified no waiting.
@@ -1451,7 +1451,7 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS procpid,
       arg1 is the requested lock mode, either exclusive or shared.</entry>
     </row>
     <row>
-     <entry>lock-wait-start</entry>
+     <entry>lock__wait__start</entry>
      <entry>(unsigned int, unsigned int, unsigned int, unsigned int, unsigned 
int, LOCKMODE)</entry>
      <entry>Probe that fires when a request for a heavyweight lock (lmgr lock)
       has begun to wait because the lock is not available.
@@ -1460,14 +1460,14 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS procpid,
       arg5 indicates the lock type being requested.</entry>
     </row>
     <row>
-     <entry>lock-wait-done</entry>
+     <entry>lock__wait__done</entry>
      <entry>(unsigned int, unsigned int, unsigned int, unsigned int, unsigned 
int, LOCKMODE)</entry>
      <entry>Probe that fires when a request for a heavyweight lock (lmgr lock)
       has finished waiting (i.e., has acquired the lock).
-      The arguments are the same as for lock-wait-start.</entry>
+      The arguments are the same as for lock__wait__start.</entry>
     </row>
     <row>
-     <entry>deadlock-found</entry>
+     <entry>deadlock__found</entry>
      <entry>()</entry>
      <entry>Probe that fires when a deadlock is found by the deadlock
       detector.</entry>

Attachment: signature.asc
Description: Digital signature

Reply via email to