From 5e813edb55ed16f3b5540f099319bcca7ca1b816 Mon Sep 17 00:00:00 2001 From: Fujii Masao Date: Wed, 24 Dec 2025 23:25:00 +0900 Subject: [PATCH] Fix version check for retain_dead_tuples subscription option. The retain_dead_tuples subscription option is supported only when the publisher runs PostgreSQL 19 or later. However, it could previously be enabled even when the publisher was running an earlier version. This was caused by check_pub_dead_tuple_retention() comparing the publisher server version against 19000 instead of 190000. Fix this typo so that the version check correctly enforces the PG19+ requirement. Author: Fujii Masao Reviewed-by: Amit Kapila Reviewed-by: Hayato Kuroda Reviewed-by: Shlok Kyal Discussion: https://postgr.es/m/CAHGQGwEx4twHtJdiPWTyAXJhcBPLaH467SH2ajGSe-41m65giA@mail.gmail.com --- src/backend/commands/subscriptioncmds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/commands/subscriptioncmds.c b/src/backend/commands/subscriptioncmds.c index 921cd9674f..7b118a5020 100644 --- a/src/backend/commands/subscriptioncmds.c +++ b/src/backend/commands/subscriptioncmds.c @@ -2753,7 +2753,7 @@ check_pub_dead_tuple_retention(WalReceiverConn *wrconn) bool isnull; bool remote_in_recovery; - if (walrcv_server_version(wrconn) < 19000) + if (walrcv_server_version(wrconn) < 190000) ereport(ERROR, errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), errmsg("cannot enable retain_dead_tuples if the publisher is running a version earlier than PostgreSQL 19"));