From 64360987953e450e53098e6b79d89c5b80dc7842 Mon Sep 17 00:00:00 2001
From: Robert Haas <rhaas@postgresql.org>
Date: Thu, 10 Mar 2011 14:57:02 -0500
Subject: [PATCH] Minor sync rep corrections.

Fujii Masao, with a bit of additional wordsmithing by me.
---
 src/backend/replication/syncrep.c  | 6 +++---
 src/backend/storage/ipc/shmqueue.c | 2 +-
 src/include/replication/syncrep.h  | 3 +--
 3 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/src/backend/replication/syncrep.c b/src/backend/replication/syncrep.c
index d5868d66b7d..0033b5559f3 100644
--- a/src/backend/replication/syncrep.c
+++ b/src/backend/replication/syncrep.c
@@ -447,9 +447,9 @@ SyncRepGetStandbyPriority(void)
 }
 
 /*
- * Walk queue from head setting setting the state of any backends that
- * need to be woken, remove them from the queue and then wake them.
- * Set all = true to wake whole queue, or just up to LSN.
+ * Walk queue from head.  Set the state of any backends that need to be woken,
+ * remove them from the queue, and then wake them.  Pass all = true to wake
+ * whole queue; otherwise, just wake up to the walsender's LSN.
  *
  * Must hold SyncRepLock.
  */
diff --git a/src/backend/storage/ipc/shmqueue.c b/src/backend/storage/ipc/shmqueue.c
index 5d684b2b85f..d7ec3013a6e 100644
--- a/src/backend/storage/ipc/shmqueue.c
+++ b/src/backend/storage/ipc/shmqueue.c
@@ -157,7 +157,7 @@ SHMQueueNext(const SHM_QUEUE *queue, const SHM_QUEUE *curElem, Size linkOffset)
 /*--------------------
  * SHMQueuePrev -- Get the previous element from a queue
  *
- * Same as SHMQueueNext, just starting at tail and moving towards head
+ * Same as SHMQueueNext, just starting at tail and moving towards head.
  * All other comments and usage applies.
  */
 Pointer
diff --git a/src/include/replication/syncrep.h b/src/include/replication/syncrep.h
index fb86e9e8d65..1c6d39238c4 100644
--- a/src/include/replication/syncrep.h
+++ b/src/include/replication/syncrep.h
@@ -29,7 +29,6 @@
 
 /* user-settable parameters for synchronous replication */
 extern bool sync_rep_mode;
-extern int 	sync_rep_timeout;
 extern char *SyncRepStandbyNames;
 
 /* called by user backend */
@@ -44,6 +43,6 @@ extern void SyncRepReleaseWaiters(void);
 
 /* called by various procs */
 extern int SyncRepWakeQueue(bool all);
-const char *assign_synchronous_standby_names(const char *newval, bool doit, GucSource source);
+extern const char *assign_synchronous_standby_names(const char *newval, bool doit, GucSource source);
 
 #endif   /* _SYNCREP_H */
-- 
GitLab