From: Peter Eisentraut Date: Sat, 14 Apr 2018 14:04:36 +0000 (-0400) Subject: Improve code comments X-Git-Tag: REL_11_BETA1~240 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e013288a6509549866c5d531257480f159c6900d;p=thirdparty%2Fpostgresql.git Improve code comments As of 0c2c81b403db420bfce36f168887db72932dbf09, the replication parameter in libpq is no longer "deliberately undocumented". --- diff --git a/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c b/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c index ec37377efe5..e4d261bd793 100644 --- a/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c +++ b/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c @@ -128,10 +128,7 @@ libpqrcv_connect(const char *conninfo, bool logical, const char *appname, /* * We use the expand_dbname parameter to process the connection string (or - * URI), and pass some extra options. The deliberately undocumented - * parameter "replication=true" makes it a replication connection. The - * database name is ignored by the server in replication mode, but specify - * "replication" for .pgpass lookup. + * URI), and pass some extra options. */ keys[i] = "dbname"; vals[i] = conninfo; @@ -139,6 +136,10 @@ libpqrcv_connect(const char *conninfo, bool logical, const char *appname, vals[i] = logical ? "database" : "true"; if (!logical) { + /* + * The database name is ignored by the server in replication mode, but + * specify "replication" for .pgpass lookup. + */ keys[++i] = "dbname"; vals[i] = "replication"; }