diff --git a/postfix/HISTORY b/postfix/HISTORY
index c4ad2197e..5df45409d 100644
--- a/postfix/HISTORY
+++ b/postfix/HISTORY
@@ -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.
diff --git a/postfix/html/ldap_table.5.html b/postfix/html/ldap_table.5.html
index e805a35c2..38875eb5f 100644
--- a/postfix/html/ldap_table.5.html
+++ b/postfix/html/ldap_table.5.html
@@ -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):
diff --git a/postfix/html/mysql_table.5.html b/postfix/html/mysql_table.5.html
index 9d06504ba..c75906641 100644
--- a/postfix/html/mysql_table.5.html
+++ b/postfix/html/mysql_table.5.html
@@ -61,11 +61,11 @@ MYSQL_TABLE(5) MYSQL_TABLE(5)
TCP you have to specify
hosts = 127.0.0.1
- NOTE: if the hosts 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 hosts 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.
user
@@ -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 hosts 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 hosts 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.
diff --git a/postfix/html/pgsql_table.5.html b/postfix/html/pgsql_table.5.html
index 5bb1778ad..e44279000 100644
--- a/postfix/html/pgsql_table.5.html
+++ b/postfix/html/pgsql_table.5.html
@@ -65,11 +65,11 @@ PGSQL_TABLE(5) PGSQL_TABLE(5)
URI, the Postfix PostgreSQL client will ignore the dbname, user,
and password settings for that connection.
- NOTE: if the hosts 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 hosts 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.
user
@@ -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 hosts 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 hosts 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.
diff --git a/postfix/man/man5/ldap_table.5 b/postfix/man/man5/ldap_table.5
index 7a8dfc19e..d5048b4e7 100644
--- a/postfix/man/man5/ldap_table.5
+++ b/postfix/man/man5/ldap_table.5
@@ -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):
diff --git a/postfix/man/man5/mysql_table.5 b/postfix/man/man5/mysql_table.5
index 3d29c54a8..865f9d07f 100644
--- a/postfix/man/man5/mysql_table.5
+++ b/postfix/man/man5/mysql_table.5
@@ -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"
diff --git a/postfix/man/man5/pgsql_table.5 b/postfix/man/man5/pgsql_table.5
index ac09444c9..51df7338e 100644
--- a/postfix/man/man5/pgsql_table.5
+++ b/postfix/man/man5/pgsql_table.5
@@ -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"
diff --git a/postfix/proto/ldap_table b/postfix/proto/ldap_table
index fadf24a88..79047755d 100644
--- a/postfix/proto/ldap_table
+++ b/postfix/proto/ldap_table
@@ -87,11 +87,9 @@
# 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):
diff --git a/postfix/proto/mysql_table b/postfix/proto/mysql_table
index f0066e9bf..fc1c238c8 100644
--- a/postfix/proto/mysql_table
+++ b/postfix/proto/mysql_table
@@ -67,11 +67,11 @@
# 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.
@@ -102,11 +102,11 @@
# 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"
diff --git a/postfix/proto/pgsql_table b/postfix/proto/pgsql_table
index 0413e3c74..cba9e45f4 100644
--- a/postfix/proto/pgsql_table
+++ b/postfix/proto/pgsql_table
@@ -71,11 +71,11 @@
# 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.
@@ -119,11 +119,11 @@
# 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"
diff --git a/postfix/src/global/dict_mysql.c b/postfix/src/global/dict_mysql.c
index 7d113d299..6124d6e19 100644
--- a/postfix/src/global/dict_mysql.c
+++ b/postfix/src/global/dict_mysql.c
@@ -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);
}
diff --git a/postfix/src/global/dict_pgsql.c b/postfix/src/global/dict_pgsql.c
index aefd0f6f3..81a11a167 100644
--- a/postfix/src/global/dict_pgsql.c
+++ b/postfix/src/global/dict_pgsql.c
@@ -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);
}
diff --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h
index f55824292..26626a7bc 100644
--- a/postfix/src/global/mail_version.h
+++ b/postfix/src/global/mail_version.h
@@ -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