]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-3.10-20250207
authorWietse Z Venema <wietse@porcupine.org>
Fri, 7 Feb 2025 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <ietf-dane@dukhovni.org>
Mon, 10 Feb 2025 04:55:29 +0000 (15:55 +1100)
13 files changed:
postfix/HISTORY
postfix/html/ldap_table.5.html
postfix/html/mysql_table.5.html
postfix/html/pgsql_table.5.html
postfix/man/man5/ldap_table.5
postfix/man/man5/mysql_table.5
postfix/man/man5/pgsql_table.5
postfix/proto/ldap_table
postfix/proto/mysql_table
postfix/proto/pgsql_table
postfix/src/global/dict_mysql.c
postfix/src/global/dict_pgsql.c
postfix/src/global/mail_version.h

index c4ad2197e552ebf10855f5ecf0cc30bbbf14f6ce..5df45409dbc14fa3759d93c6a416cc6f8322483d 100644 (file)
@@ -28933,4 +28933,12 @@ Apologies for any names omitted.
        policy plugin, deprecated the policy_ttl attribute. File:
        proto/TLSRPT_README.html.
 
+20250207
+
+       Performance: when a mysql: or pgsql: configuration specifies
+       a single host, assume that it is a load balancer and reconnect
+       immediately after a single failure, instead of failing all
+       requests for 60s. Files: global/dict_pgsql.c, global/dict_mysql.c,
+       proto/pgsql_table, proto/mysql_table.
+
        Postfix 3.10 code freeze.
index e805a35c27a002eec9e36768625cf0ebdd35a2f9..38875eb5f33a035189f3d9eb496d38442d776a73 100644 (file)
@@ -78,11 +78,9 @@ LDAP_TABLE(5)                                                    LDAP_TABLE(5)
 
                   server_host = ldap.example.com:1444
 
-              NOTE: if "server_host" specifies one load balancer and no alter-
-              native servers, specify the load balancer multiple times in  the
-              "server_host" line. Without the duplicate info, the Postfix LDAP
-              client would not reconnect immediately to the same load balancer
-              after an LDAP server failure.
+              NOTE:  this  client  will  reconnect  immediately after a single
+              failure, and will fail a lookup request after a  second  attempt
+              also fails.
 
               With OpenLDAP, a (list of) LDAP URLs can be used to specify both
               the hostname(s) and the port(s):
index 9d06504ba5ba3c3c0183a0af363e79b20027775e..c759066415154cf14fab068f0b1d1a85226b94f6 100644 (file)
@@ -61,11 +61,11 @@ MYSQL_TABLE(5)                                                  MYSQL_TABLE(5)
               TCP you have to specify
                   hosts = 127.0.0.1
 
-              NOTE:  if  the  <b>hosts</b> setting specifies one load balancer and no
-              alternative servers, specify the load balancer  multiple  times.
-              Without  the  duplicate info, the Postfix MySQL client would not
-              reconnect immediately to the same load balancer after a  request
-              failure.
+              NOTE:  if  the  <b>hosts</b>  setting specifies one server, this client
+              assumes that the target is a load balancer  and  will  reconnect
+              immediately  after  a  single  failure,  instead  of failing all
+              requests temporarily. With older versions of this client,  spec-
+              ify the same server twice.
 
        <b>user</b>
 
@@ -96,11 +96,11 @@ MYSQL_TABLE(5)                                                  MYSQL_TABLE(5)
               The number of seconds that a database connection will be skipped
               after an error.
 
-              NOTE:  if  the  <b>hosts</b> setting specifies one load balancer and no
-              alternative servers, specify the load balancer  multiple  times.
-              Without  the  duplicate info, the Postfix MySQL client would not
-              reconnect immediately to the same load balancer after a  request
-              failure.
+              NOTE:  if  the  <b>hosts</b>  setting specifies one server, this client
+              assumes that the target is a load balancer  and  will  reconnect
+              immediately  after  a  single  failure,  instead  of failing all
+              requests temporarily. With older versions of this client,  spec-
+              ify the same server twice.
 
               This feature is available in Postfix 3.9 and later.
 
index 5bb1778ad0b43369429e392ece3a166d12e39589..e44279000691b5c5bd81b84faea53b6d26e69fba 100644 (file)
@@ -65,11 +65,11 @@ PGSQL_TABLE(5)                                                  PGSQL_TABLE(5)
               URI, the Postfix PostgreSQL client will ignore the <b>dbname</b>, <b>user</b>,
               and <b>password</b> settings for that connection.
 
-              NOTE: if the <b>hosts</b> setting specifies one load  balancer  and  no
-              alternative  servers,  specify the load balancer multiple times.
-              Without the duplicate info, the Postfix PostgreSQL client  would
-              not  reconnect  immediately  to  the  same load balancer after a
-              request failure.
+              NOTE: if the <b>hosts</b> setting specifies  one  server,  this  client
+              assumes  that  the  target is a load balancer and will reconnect
+              immediately after a  single  failure,  instead  of  failing  all
+              requests  temporarily. With older versions of this client, spec-
+              ify the same server twice.
 
        <b>user</b>
 
@@ -112,11 +112,11 @@ PGSQL_TABLE(5)                                                  PGSQL_TABLE(5)
               The number of seconds that a database connection will be skipped
               after an error.
 
-              NOTE:  if  the  <b>hosts</b> setting specifies one load balancer and no
-              alternative servers, specify the load balancer  multiple  times.
-              Without  the duplicate info, the Postfix PostgreSQL client would
-              not reconnect immediately to the  same  load  balancer  after  a
-              request failure.
+              NOTE:  if  the  <b>hosts</b>  setting specifies one server, this client
+              assumes that the target is a load balancer  and  will  reconnect
+              immediately  after  a  single  failure,  instead  of failing all
+              requests temporarily. With older versions of this client,  spec-
+              ify the same server twice.
 
               This feature is available in Postfix 3.9 and later.
 
index 7a8dfc19e404f9ac1a80dfd4b41b6b9332862194..d5048b4e780a22add1c97e62afc620a91463d8d7 100644 (file)
@@ -97,11 +97,9 @@ be possible to give each server in the list a different port
     server_host = ldap.example.com:1444
 .fi
 
-NOTE: if "server_host" specifies one load balancer and no
-alternative servers, specify the load balancer multiple
-times in the "server_host" line. Without the duplicate info,
-the Postfix LDAP client would not reconnect immediately to
-the same load balancer after an LDAP server failure.
+NOTE: this client will reconnect immediately after a single
+failure, and will fail a lookup request after a second attempt
+also fails.
 
 With OpenLDAP, a (list of) LDAP URLs can be used to specify both
 the hostname(s) and the port(s):
index 3d29c54a84563f8201f9f5eea761dade73eccf31..865f9d07f5368646a5bec08cb1f29382ceb67449 100644 (file)
@@ -77,11 +77,11 @@ localhost over TCP you have to specify
     hosts = 127.0.0.1
 .fi
 
-NOTE: if the \fBhosts\fR setting specifies one load balancer
-and no alternative servers, specify the load balancer multiple
-times. Without the duplicate info, the Postfix MySQL client
-would not reconnect immediately to the same load balancer after
-a request failure.
+NOTE: if the \fBhosts\fR setting specifies one server, this client
+assumes that the target is a load balancer and will reconnect
+immediately after a single failure, instead of failing all
+requests temporarily. With older versions of this client,
+specify the same server twice.
 .IP "\fBuser\fR"
 .IP "\fBpassword\fR"
 The user name and password to log into the mysql server.
@@ -112,11 +112,11 @@ This feature is available in Postfix 3.9 and later.
 The number of seconds that a database connection will be
 skipped after an error.
 
-NOTE: if the \fBhosts\fR setting specifies one load balancer
-and no alternative servers, specify the load balancer multiple
-times. Without the duplicate info, the Postfix MySQL client
-would not reconnect immediately to the same load balancer after
-a request failure.
+NOTE: if the \fBhosts\fR setting specifies one server, this client
+assumes that the target is a load balancer and will reconnect
+immediately after a single failure, instead of failing all
+requests temporarily. With older versions of this client,
+specify the same server twice.
 
 This feature is available in Postfix 3.9 and later.
 .IP "\fBquery\fR"
index ac09444c96c8ce15dd2e2a42967c0a9f963ec905..51df7338ecfc5038c0172796674cbe3ad26a715d 100644 (file)
@@ -81,11 +81,11 @@ NOTE: if the \fBhosts\fR setting specifies a PostgreSQL connection
 URI, the Postfix PostgreSQL client will ignore the \fBdbname\fR,
 \fBuser\fR, and \fBpassword\fR settings for that connection.
 
-NOTE: if the \fBhosts\fR setting specifies one load balancer
-and no alternative servers, specify the load balancer multiple
-times. Without the duplicate info, the Postfix PostgreSQL client
-would not reconnect immediately to the same load balancer after
-a request failure.
+NOTE: if the \fBhosts\fR setting specifies one server, this client
+assumes that the target is a load balancer and will reconnect
+immediately after a single failure, instead of failing all
+requests temporarily. With older versions of this client,
+specify the same server twice.
 .IP "\fBuser\fR"
 .IP "\fBpassword\fR"
 The user name and password to log into the pgsql server.
@@ -129,11 +129,11 @@ This feature is available in Postfix 3.9 and later.
 The number of seconds that a database connection will be
 skipped after an error.
 
-NOTE: if the \fBhosts\fR setting specifies one load balancer
-and no alternative servers, specify the load balancer multiple
-times. Without the duplicate info, the Postfix PostgreSQL client
-would not reconnect immediately to the same load balancer after
-a request failure.
+NOTE: if the \fBhosts\fR setting specifies one server, this client
+assumes that the target is a load balancer and will reconnect
+immediately after a single failure, instead of failing all
+requests temporarily. With older versions of this client,
+specify the same server twice.
 
 This feature is available in Postfix 3.9 and later.
 .IP "\fBquery\fR"
index fadf24a88b370478179eab3a53c8513a43a1fde3..79047755dcff95c216c532e34169fee5a44fcde7 100644 (file)
 #          server_host = ldap.example.com:1444
 # .fi
 #
-#      NOTE: if "server_host" specifies one load balancer and no
-#      alternative servers, specify the load balancer multiple
-#      times in the "server_host" line. Without the duplicate info,
-#      the Postfix LDAP client would not reconnect immediately to
-#      the same load balancer after an LDAP server failure.
+#      NOTE: this client will reconnect immediately after a single
+#      failure, and will fail a lookup request after a second attempt
+#      also fails.
 #
 #      With OpenLDAP, a (list of) LDAP URLs can be used to specify both
 #      the hostname(s) and the port(s):
index f0066e9bff80dad1b48b6dab49cb0e746ecdf9f2..fc1c238c839d418b20785f1a97a08e7e8df2f64d 100644 (file)
 #          hosts = 127.0.0.1
 # .fi
 #
-#      NOTE: if the \fBhosts\fR setting specifies one load balancer
-#      and no alternative servers, specify the load balancer multiple
-#      times. Without the duplicate info, the Postfix MySQL client
-#      would not reconnect immediately to the same load balancer after
-#      a request failure.
+#      NOTE: if the \fBhosts\fR setting specifies one server, this client
+#      assumes that the target is a load balancer and will reconnect
+#      immediately after a single failure, instead of failing all
+#      requests temporarily. With older versions of this client,
+#      specify the same server twice.
 # .IP "\fBuser\fR"
 # .IP "\fBpassword\fR"
 #      The user name and password to log into the mysql server.
 #      The number of seconds that a database connection will be
 #      skipped after an error.
 #
-#      NOTE: if the \fBhosts\fR setting specifies one load balancer
-#      and no alternative servers, specify the load balancer multiple
-#      times. Without the duplicate info, the Postfix MySQL client
-#      would not reconnect immediately to the same load balancer after
-#      a request failure.
+#      NOTE: if the \fBhosts\fR setting specifies one server, this client
+#      assumes that the target is a load balancer and will reconnect
+#      immediately after a single failure, instead of failing all
+#      requests temporarily. With older versions of this client,
+#      specify the same server twice.
 #
 #      This feature is available in Postfix 3.9 and later.
 # .IP "\fBquery\fR"
index 0413e3c74bf3c0dd89e7e63e180d4cd403d33058..cba9e45f48be5b273ec0a9f0db1c65b67d86d06a 100644 (file)
 #      URI, the Postfix PostgreSQL client will ignore the \fBdbname\fR,
 #      \fBuser\fR, and \fBpassword\fR settings for that connection.
 #
-#      NOTE: if the \fBhosts\fR setting specifies one load balancer
-#      and no alternative servers, specify the load balancer multiple
-#      times. Without the duplicate info, the Postfix PostgreSQL client
-#      would not reconnect immediately to the same load balancer after
-#      a request failure.
+#      NOTE: if the \fBhosts\fR setting specifies one server, this client
+#      assumes that the target is a load balancer and will reconnect
+#      immediately after a single failure, instead of failing all
+#      requests temporarily. With older versions of this client,
+#      specify the same server twice.
 # .IP "\fBuser\fR"
 # .IP "\fBpassword\fR"
 #      The user name and password to log into the pgsql server.
 #      The number of seconds that a database connection will be
 #      skipped after an error.
 #
-#      NOTE: if the \fBhosts\fR setting specifies one load balancer
-#      and no alternative servers, specify the load balancer multiple
-#      times. Without the duplicate info, the Postfix PostgreSQL client
-#      would not reconnect immediately to the same load balancer after
-#      a request failure.
+#      NOTE: if the \fBhosts\fR setting specifies one server, this client
+#      assumes that the target is a load balancer and will reconnect
+#      immediately after a single failure, instead of failing all
+#      requests temporarily. With older versions of this client,
+#      specify the same server twice.
 #
 #      This feature is available in Postfix 3.9 and later.
 # .IP "\fBquery\fR"
index 7d113d29982c1b75fb97efc07679e28d532e9f6f..6124d6e1961b08c41750873a4bee6249d0ce7955 100644 (file)
@@ -757,6 +757,9 @@ static void mysql_parse_config(DICT_MYSQL *dict_mysql, const char *mysqlcf)
            msg_info("%s: %s: no hostnames specified, defaulting to '%s'",
                     myname, mysqlcf, dict_mysql->hosts->argv[0]);
     }
+    /* Don't blacklist the load balancer! */
+    if (dict_mysql->hosts->argc == 1)
+        argv_add(dict_mysql->hosts, dict_mysql->hosts->argv[0], (char *) 0);
     myfree(hosts);
 }
 
index aefd0f6f3b33c0104e9c47064b2c5dcac0d735af..81a11a167b2c1c3a0e66e58aeec1c7fd75bc3e44 100644 (file)
@@ -689,6 +689,9 @@ static void pgsql_parse_config(DICT_PGSQL *dict_pgsql, const char *pgsqlcf)
            msg_info("%s: %s: no hostnames specified, defaulting to '%s'",
                     myname, pgsqlcf, dict_pgsql->hosts->argv[0]);
     }
+    /* Don't blacklist the load balancer! */
+    if (dict_pgsql->hosts->argc == 1)
+       argv_add(dict_pgsql->hosts, dict_pgsql->hosts->argv[0], (char *) 0);
     myfree(hosts);
 }
 
index f5582429230eafcac7cacea5fc1a8b2b95ae30e0..26626a7bc38c05af1184804f3de097b787b0f277 100644 (file)
@@ -20,7 +20,7 @@
   * Patches change both the patchlevel and the release date. Snapshots have no
   * patchlevel; they change the release date only.
   */
-#define MAIL_RELEASE_DATE      "20250206"
+#define MAIL_RELEASE_DATE      "20250207"
 #define MAIL_VERSION_NUMBER    "3.10"
 
 #ifdef SNAPSHOT