Hi all

Before 9.5 goes final, lets change replorigin_sesssion_origin and
replorigin_sesssion_origin_lsn to remove the extra 's'.

Yes, it's trivial.

-- 
 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services
From 5e2abf558e0b68064aa4f5012d023a76786c2778 Mon Sep 17 00:00:00 2001
From: Craig Ringer <cr...@2ndquadrant.com>
Date: Wed, 14 Oct 2015 16:47:20 +0800
Subject: [PATCH] Spelling fix: replorigin_sesssion_origin

---
 src/backend/access/transam/xact.c        | 20 ++++++++++----------
 src/backend/access/transam/xloginsert.c  |  6 +++---
 src/backend/replication/logical/origin.c | 26 +++++++++++++-------------
 src/include/replication/origin.h         |  6 +++---
 4 files changed, 29 insertions(+), 29 deletions(-)

diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c
index b53d95f..5c2966d 100644
--- a/src/backend/access/transam/xact.c
+++ b/src/backend/access/transam/xact.c
@@ -1210,12 +1210,12 @@ RecordTransactionCommit(void)
 		 * Record plain commit ts if not replaying remote actions, or if no
 		 * timestamp is configured.
 		 */
-		if (replorigin_sesssion_origin == InvalidRepOriginId ||
-			replorigin_sesssion_origin == DoNotReplicateId ||
-			replorigin_sesssion_origin_timestamp == 0)
-			replorigin_sesssion_origin_timestamp = xactStopTimestamp;
+		if (replorigin_session_origin == InvalidRepOriginId ||
+			replorigin_session_origin == DoNotReplicateId ||
+			replorigin_session_origin_timestamp == 0)
+			replorigin_session_origin_timestamp = xactStopTimestamp;
 		else
-			replorigin_session_advance(replorigin_sesssion_origin_lsn,
+			replorigin_session_advance(replorigin_session_origin_lsn,
 									   XactLastRecEnd);
 
 		/*
@@ -1224,8 +1224,8 @@ RecordTransactionCommit(void)
 		 * action during replay.
 		 */
 		TransactionTreeSetCommitTsData(xid, nchildren, children,
-									   replorigin_sesssion_origin_timestamp,
-									   replorigin_sesssion_origin, false);
+									   replorigin_session_origin_timestamp,
+									   replorigin_session_origin, false);
 	}
 
 	/*
@@ -5133,12 +5133,12 @@ XactLogCommitRecord(TimestampTz commit_time,
 	}
 
 	/* dump transaction origin information */
-	if (replorigin_sesssion_origin != InvalidRepOriginId)
+	if (replorigin_session_origin != InvalidRepOriginId)
 	{
 		xl_xinfo.xinfo |= XACT_XINFO_HAS_ORIGIN;
 
-		xl_origin.origin_lsn = replorigin_sesssion_origin_lsn;
-		xl_origin.origin_timestamp = replorigin_sesssion_origin_timestamp;
+		xl_origin.origin_lsn = replorigin_session_origin_lsn;
+		xl_origin.origin_timestamp = replorigin_session_origin_timestamp;
 	}
 
 	if (xl_xinfo.xinfo != 0)
diff --git a/src/backend/access/transam/xloginsert.c b/src/backend/access/transam/xloginsert.c
index abd8420..925255f 100644
--- a/src/backend/access/transam/xloginsert.c
+++ b/src/backend/access/transam/xloginsert.c
@@ -701,11 +701,11 @@ XLogRecordAssemble(RmgrId rmid, uint8 info,
 	}
 
 	/* followed by the record's origin, if any */
-	if (include_origin && replorigin_sesssion_origin != InvalidRepOriginId)
+	if (include_origin && replorigin_session_origin != InvalidRepOriginId)
 	{
 		*(scratch++) = XLR_BLOCK_ID_ORIGIN;
-		memcpy(scratch, &replorigin_sesssion_origin, sizeof(replorigin_sesssion_origin));
-		scratch += sizeof(replorigin_sesssion_origin);
+		memcpy(scratch, &replorigin_session_origin, sizeof(replorigin_session_origin));
+		scratch += sizeof(replorigin_session_origin);
 	}
 
 	/* followed by main data, if any */
diff --git a/src/backend/replication/logical/origin.c b/src/backend/replication/logical/origin.c
index c219590..a6a1e4b 100644
--- a/src/backend/replication/logical/origin.c
+++ b/src/backend/replication/logical/origin.c
@@ -148,9 +148,9 @@ typedef struct ReplicationStateCtl
 } ReplicationStateCtl;
 
 /* external variables */
-RepOriginId replorigin_sesssion_origin = InvalidRepOriginId;	/* assumed identity */
-XLogRecPtr	replorigin_sesssion_origin_lsn = InvalidXLogRecPtr;
-TimestampTz replorigin_sesssion_origin_timestamp = 0;
+RepOriginId replorigin_session_origin = InvalidRepOriginId;	/* assumed identity */
+XLogRecPtr	replorigin_session_origin_lsn = InvalidXLogRecPtr;
+TimestampTz replorigin_session_origin_timestamp = 0;
 
 /*
  * Base address into a shared memory array of replication states of size
@@ -803,7 +803,7 @@ replorigin_redo(XLogReaderState *record)
  * Tell the replication origin progress machinery that a commit from 'node'
  * that originated at the LSN remote_commit on the remote node was replayed
  * successfully and that we don't need to do so again. In combination with
- * setting up replorigin_sesssion_origin_lsn and replorigin_sesssion_origin
+ * setting up replorigin_session_origin_lsn and replorigin_session_origin
  * that ensures we won't loose knowledge about that after a crash if the
  * transaction had a persistent effect (think of asynchronous commits).
  *
@@ -1236,7 +1236,7 @@ pg_replication_origin_session_setup(PG_FUNCTION_ARGS)
 	origin = replorigin_by_name(name, false);
 	replorigin_session_setup(origin);
 
-	replorigin_sesssion_origin = origin;
+	replorigin_session_origin = origin;
 
 	pfree(name);
 
@@ -1253,9 +1253,9 @@ pg_replication_origin_session_reset(PG_FUNCTION_ARGS)
 
 	replorigin_session_reset();
 
-	replorigin_sesssion_origin = InvalidRepOriginId;
-	replorigin_sesssion_origin_lsn = InvalidXLogRecPtr;
-	replorigin_sesssion_origin_timestamp = 0;
+	replorigin_session_origin = InvalidRepOriginId;
+	replorigin_session_origin_lsn = InvalidXLogRecPtr;
+	replorigin_session_origin_timestamp = 0;
 
 	PG_RETURN_VOID();
 }
@@ -1268,7 +1268,7 @@ pg_replication_origin_session_is_setup(PG_FUNCTION_ARGS)
 {
 	replorigin_check_prerequisites(false, false);
 
-	PG_RETURN_BOOL(replorigin_sesssion_origin != InvalidRepOriginId);
+	PG_RETURN_BOOL(replorigin_session_origin != InvalidRepOriginId);
 }
 
 
@@ -1312,8 +1312,8 @@ pg_replication_origin_xact_setup(PG_FUNCTION_ARGS)
 				(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
 				 errmsg("no replication origin is configured")));
 
-	replorigin_sesssion_origin_lsn = location;
-	replorigin_sesssion_origin_timestamp = PG_GETARG_TIMESTAMPTZ(1);
+	replorigin_session_origin_lsn = location;
+	replorigin_session_origin_timestamp = PG_GETARG_TIMESTAMPTZ(1);
 
 	PG_RETURN_VOID();
 }
@@ -1323,8 +1323,8 @@ pg_replication_origin_xact_reset(PG_FUNCTION_ARGS)
 {
 	replorigin_check_prerequisites(true, false);
 
-	replorigin_sesssion_origin_lsn = InvalidXLogRecPtr;
-	replorigin_sesssion_origin_timestamp = 0;
+	replorigin_session_origin_lsn = InvalidXLogRecPtr;
+	replorigin_session_origin_timestamp = 0;
 
 	PG_RETURN_VOID();
 }
diff --git a/src/include/replication/origin.h b/src/include/replication/origin.h
index 8cec434..daa3b93 100644
--- a/src/include/replication/origin.h
+++ b/src/include/replication/origin.h
@@ -34,9 +34,9 @@ typedef struct xl_replorigin_drop
 #define InvalidRepOriginId 0
 #define DoNotReplicateId PG_UINT16_MAX
 
-extern PGDLLIMPORT RepOriginId replorigin_sesssion_origin;
-extern PGDLLIMPORT XLogRecPtr replorigin_sesssion_origin_lsn;
-extern PGDLLIMPORT TimestampTz replorigin_sesssion_origin_timestamp;
+extern PGDLLIMPORT RepOriginId replorigin_session_origin;
+extern PGDLLIMPORT XLogRecPtr replorigin_session_origin_lsn;
+extern PGDLLIMPORT TimestampTz replorigin_session_origin_timestamp;
 
 /* API for querying & manipulating replication origins */
 extern RepOriginId replorigin_by_name(char *name, bool missing_ok);
-- 
2.1.0

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to