git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 75867c5)
Add connection messages for streaming replication. log_connections
2010年3月19日 19:19:38 +0000 (19:19 +0000)
2010年3月19日 19:19:38 +0000 (19:19 +0000)
was broken for a replication connection and no messages were
displayed on either standby or primary, at any debug level.
Connection messages needed to diagnose session drop/reconnect
events. Use LOG mode for now, discuss lowering in later releases.


diff --git a/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c b/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c
index b6708e65284f727329c8ed66f401a74752b942e1..7c74ec8052366828ebd3e97b688abbbfd4ae06c0 100644 (file)
--- a/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c
+++ b/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c
@@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c,v 1.6 2010年03月19日 17:51:42 sriggs Exp $
+ * $PostgreSQL: pgsql/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c,v 1.7 2010年03月19日 19:19:38 sriggs Exp $
*
*-------------------------------------------------------------------------
*/
@@ -157,6 +157,8 @@ libpqrcv_connect(char *conninfo, XLogRecPtr startpoint)
PQclear(res);
justconnected = true;
+ ereport(LOG,
+ (errmsg("streaming replication successfully connected to primary")));
return true;
}
diff --git a/src/backend/utils/init/postinit.c b/src/backend/utils/init/postinit.c
index 01cb07da2d3c05d48c3ec8016176f12f49112fcc..026ee47484477143a96e327f87c16c3f43c33190 100644 (file)
--- a/src/backend/utils/init/postinit.c
+++ b/src/backend/utils/init/postinit.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/utils/init/postinit.c,v 1.204 2010年02月26日 02:01:13 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/init/postinit.c,v 1.205 2010年03月19日 19:19:38 sriggs Exp $
*
*
*-------------------------------------------------------------------------
@@ -217,7 +217,14 @@ PerformAuthentication(Port *port)
if (!disable_sig_alarm(true))
elog(FATAL, "could not disable timer for authorization timeout");
- if (Log_connections)
+ /*
+ * Log connection for streaming replication even if Log_connections disabled.
+ */
+ if (am_walsender)
+ ereport(LOG,
+ (errmsg("connection authorized: user=%s database=replication",
+ port->user_name)));
+ else if (Log_connections)
ereport(LOG,
(errmsg("connection authorized: user=%s database=%s",
port->user_name, port->database_name)));
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /