From 0f63b74a47307bf00fd6301cc3612f9db924a0d1 Mon Sep 17 00:00:00 2001 From: Heikki Linnakangas Date: Mon, 15 Jun 2026 11:28:45 +0300 Subject: [PATCH] Fix PQdescribePrepared with more than 7498 params If a query has more than 7498 params, the ParameterDescription message exceeds the 30000 byte limit on messages that are not specifically marked as possibly being longer than that (VALID_LONG_MESSAGE_TYPE). To fix, add ParameterDescription to the list. Author: Ning Sun Discussion: https://www.postgresql.org/message-id/dbfb4b65-0aa8-470a-8b87-b6496160b28a@gmail.com Backpatch-through: 14 --- src/interfaces/libpq/fe-protocol3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/interfaces/libpq/fe-protocol3.c b/src/interfaces/libpq/fe-protocol3.c index e85975d944f..d09b36e9123 100644 --- a/src/interfaces/libpq/fe-protocol3.c +++ b/src/interfaces/libpq/fe-protocol3.c @@ -39,7 +39,7 @@ */ #define VALID_LONG_MESSAGE_TYPE(id) \ ((id) == 'T' || (id) == 'D' || (id) == 'd' || (id) == 'V' || \ - (id) == 'E' || (id) == 'N' || (id) == 'A') + (id) == 'E' || (id) == 'N' || (id) == 'A' || (id) == 't') static void handleSyncLoss(PGconn *conn, char id, int msgLength);