From ad9e7579035972b5e117b45177b22876f3f40683 Mon Sep 17 00:00:00 2001
From: Robert Haas <rhaas@postgresql.org>
Date: Thu, 26 Jan 2017 11:38:33 -0500
Subject: [PATCH 3/4] Rename dtrace probes for ongoing xlog -> wal conversion.

xlog-switch becomes wal-switch, and xlog-insert becomes wal-insert.
---
 doc/src/sgml/monitoring.sgml            | 4 ++--
 src/backend/access/transam/xlog.c       | 2 +-
 src/backend/access/transam/xloginsert.c | 2 +-
 src/backend/utils/probes.d              | 4 ++--
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml
index 01fad38..5b67def 100644
--- a/doc/src/sgml/monitoring.sgml
+++ b/doc/src/sgml/monitoring.sgml
@@ -3349,14 +3349,14 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid,
      <entry>Probe that fires when a dirty WAL buffer write is complete.</entry>
     </row>
     <row>
-     <entry><literal>xlog-insert</literal></entry>
+     <entry><literal>wal-insert</literal></entry>
      <entry><literal>(unsigned char, unsigned char)</literal></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><literal>xlog-switch</literal></entry>
+     <entry><literal>wal-switch</literal></entry>
      <entry><literal>()</literal></entry>
      <entry>Probe that fires when a WAL segment switch is requested.</entry>
     </row>
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index 29e0b88..54f078b 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -1107,7 +1107,7 @@ XLogInsertRecord(XLogRecData *rdata,
 	 */
 	if (isLogSwitch)
 	{
-		TRACE_POSTGRESQL_XLOG_SWITCH();
+		TRACE_POSTGRESQL_WAL_SWITCH();
 		XLogFlush(EndPos);
 
 		/*
diff --git a/src/backend/access/transam/xloginsert.c b/src/backend/access/transam/xloginsert.c
index a5aa58d..be9dfe4 100644
--- a/src/backend/access/transam/xloginsert.c
+++ b/src/backend/access/transam/xloginsert.c
@@ -427,7 +427,7 @@ XLogInsert(RmgrId rmid, uint8 info)
 	if ((info & ~(XLR_RMGR_INFO_MASK | XLR_SPECIAL_REL_UPDATE)) != 0)
 		elog(PANIC, "invalid xlog info mask %02X", info);
 
-	TRACE_POSTGRESQL_XLOG_INSERT(rmid, info);
+	TRACE_POSTGRESQL_WAL_INSERT(rmid, info);
 
 	/*
 	 * In bootstrap mode, we don't actually log anything but XLOG resources;
diff --git a/src/backend/utils/probes.d b/src/backend/utils/probes.d
index 1aaadc1..214dc71 100644
--- a/src/backend/utils/probes.d
+++ b/src/backend/utils/probes.d
@@ -87,8 +87,8 @@ provider postgresql {
 	probe smgr__md__write__start(ForkNumber, BlockNumber, Oid, Oid, Oid, int);
 	probe smgr__md__write__done(ForkNumber, BlockNumber, Oid, Oid, Oid, int, int, int);
 
-	probe xlog__insert(unsigned char, unsigned char);
-	probe xlog__switch();
+	probe wal__insert(unsigned char, unsigned char);
+	probe wal__switch();
 	probe wal__buffer__write__dirty__start();
 	probe wal__buffer__write__dirty__done();
 };
-- 
2.5.4 (Apple Git-61)

